Skip to content

Instantly share code, notes, and snippets.

View jonof's full-sized avatar

Jonathon Fowler jonof

View GitHub Profile
@jonof
jonof / focus-reporter.m
Created May 1, 2026 05:27
Report the frontmost macOS app every half-second
// cc focus-reporter.m -o focus-reporter -framework AppKit
#import <AppKit/AppKit.h>
#import <Foundation/Foundation.h>
int main(int argc, char **argv) {
[NSApplication sharedApplication];
NSWorkspace *work = [NSWorkspace sharedWorkspace];
NSTimer *timer = [NSTimer timerWithTimeInterval:0.5
repeats:YES
@jonof
jonof / ART.tcl
Created February 18, 2024 11:51
Ken Silverman's BUILD ART format for Hex Fiend
# Ken Silverman's BUILD art format
# by Jonathon Fowler <jf@jonof.id.au>
# 2024-02-18
little_endian
#requires 0 "01 00 00 00"
uint32 "Version"
set numtiles [uint32 "Num tiles"]
set localstart [uint32 "Local start"]
@jonof
jonof / MIDI.tcl
Created November 28, 2021 12:40
Standard MIDI File template for Hex Fiend
# Standard MIDI File template for Hex Fiend
# by Jonathon Fowler <jf@jonof.id.au>
# 2021-11-28
#
# Haven't fully handled sysex yet.
big_endian
requires 0 "4D 54 68 64"
section "File header" {
@jonof
jonof / notify-slack.pl
Last active September 29, 2015 22:59
A Git hook for spamming Slack
#!/usr/bin/env perl
# Should be placed as hooks/post-receive.
# GL_USER and GL_REPO are Gitolite envvars.
# Parameter handling inspired by the post-receive-email
# contrib hook shipped with Git.
use JSON;
use URI::Escape;
#my $channel = '@jonof';
@jonof
jonof / rumblepad2.txt
Created May 17, 2013 10:15
joystick configs for duke3d.cfg
JoystickButton0 = "Quick_Kick"
JoystickButtonClicked0 = ""
JoystickButton1 = "Jump"
JoystickButtonClicked1 = ""
JoystickButton2 = "Open"
JoystickButtonClicked2 = ""
JoystickButton3 = "Inventory"
JoystickButtonClicked3 = ""
JoystickButton4 = "MedKit"
JoystickButtonClicked4 = ""