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)) | |
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_bitbuffer - public domain library | |
| no warranty implied; use at your own risk | |
| Tightly pack values by bits into a stream of bytes. | |
| For example, a 1-bit bool and a 32-bit integer are packed into 33 | |
| bits. | |
| Bitbuffers are intended for small amounts of data, like a few | |
| hundred network packets where size is important enough to remove |
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
| ;; | |
| ;; remedybg minor mode | |
| ;; | |
| ;; 0.1 by Michael Labbe | |
| ;; | |
| (setq remedybg-path "c:/remedydbg/remedybg.exe") | |
| (defun remedybg-add-breakpoint-at-file() | |
| (interactive) |
NewerOlder