This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ftg m(ini) version 1 | |
| A trivially simple file format. | |
| A m(ini) file is a sequence of bytes. All syntactically significant | |
| bytes are ASCII. Keys and values are opaque byte strings; UTF-8 is | |
| recommended. | |
| The first bytes in the file are "m(ini)=001\n". There is no BOM. | |
| This is line 1. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Some sample outputs from successive runs. | |
| e|--------------------------------------------- | |
| B|--------------------------------------------- | |
| G|--------------------------------------------- | |
| D|--8---5---6-------6---3---3---6---3---3------ | |
| A|------------------------------------------3-- | |
| E|--------------6------------------------------ | |
| e|------7---4---1------------------------------ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| typedef struct { | |
| // set to one of the TRACE_RECORD_* | |
| unsigned int trace_record_type; | |
| // number of bytes from the beginning of the page this allocation took place | |
| // took place | |
| unsigned int arena_page_offset; | |
| // the page the arena came from, count from 0 | |
| unsigned int arena_page_number; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| // for type names, assert and alignment helpers | |
| // https://github.com/frogtoss/ftg_toolbox_public/blob/main/ftg_core.h | |
| #define FTG_IMPLEMENT_CORE | |
| #include "../grain/ftg_toolbox/ftg_core.h" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defcustom microjournal-path "~/.journal.org.gpg" | |
| "name for the microjournal file" | |
| :type 'file | |
| :group 'microjournal) | |
| (defun microjournal-insert-year () | |
| "Create a root header for the current year if it doesn't exist" | |
| (interactive) | |
| (let ((header-name (format-time-string "%Y"))) | |
| (goto-char (point-max)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env perl | |
| use strict; | |
| use warnings; | |
| use utf8; | |
| use File::Find; | |
| use List::Util 'shuffle'; | |
| # config | |
| my $music_dir = "$ENV{HOME}/Music/mp3s"; | |
| my $num_albums = 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| emacs --batch -l ~/.emacs \ | |
| --eval="(progn (require 'package) \ | |
| (package-initialize) \ | |
| (package-refresh-contents) \ | |
| (mapc (lambda (pkg) | |
| (let* ((new (cadr (assq pkg package-archive-contents))) | |
| (installed (cadr (assq pkg package-alist)))) | |
| (when (and new installed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import <Cocoa/Cocoa.h> | |
| #import <ApplicationServices/ApplicationServices.h> | |
| CGEventTimestamp lastTimestamp = 0; | |
| CGEventRef eventTapCallback(CGEventTapProxy proxy, CGEventType type, CGEventRef event, void *refcon) { | |
| if (type == kCGEventMouseMoved) { | |
| CGPoint location = CGEventGetLocation(event); | |
| NSLog(@"Mouse moved to: x = %.2f, y = %.2f", location.x, location.y); | |
| CGEventTimestamp currentTimestamp = CGEventGetTimestamp(event); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/perl -w | |
| use strict; | |
| # update this whe n new versions of llvm come out | |
| my $llvm_version = 19; | |
| # mint has a file that lets you know the ubuntu upstream release version | |
| sub get_dist_version_from_mint { | |
| open my $fh, '<', '/etc/upstream-release/lsb-release' or die; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdint.h> // uintptr_t | |
| #include <stddef.h> // size_t | |
| // enable printing sizes as ints to avoid faliing on compilers that don't support %zu | |
| #define SIZEOF(expr) (int)sizeof(expr) | |
| #define PRINT_SIZEOF(expr) printf("sizeof(%-11s) = %1d\n", #expr, SIZEOF(expr)) | |
NewerOlder