Skip to content

Instantly share code, notes, and snippets.

Avatar

Chris Webb arachsys

View GitHub Profile
@arachsys
arachsys / chris.asc
Created Jun 19, 2012
GnuPG public key
View chris.asc
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.12 (GNU/Linux)
mQINBE/V3aEBEADj4c9vkisq/lndiwAc/awV+uXh9KhdZhoZ6M/H2lGOWVcUYfiO
l7hYlrqBhgRFu/i+kuffoQWKAgH02ufw2L5VrL4/kE63CImQqqzzcWet/8QBqCMe
WMa7ugy8z7MKyc9NV9u7W219pR0m3yIwn83HdAUJA6tF5fBINnIybiLIXlHK3FCI
B6DxMzdA9ogBV91t9pkET63NrWX9OUE4OZxk9qYo0fpT1lXRWhlGiSBSiArtqoJ1
NYtoMT61G5LOwa2+xPBVEP7BxkQpfGunFBuwrH0F0zSWzlVDJlmipPvyA1AyKs7D
nHuPHY7GAAjCAQq0qK/hbAWnhDQ5RnEjvf7Cmhqcm+C3YQDVk9H9M33aYphwQHsN
8gjTZqxl4n5L/amoQ86HOD3Qa1EysnE3CJeYHkcDXDEbzIW8WZCKkQbpLFjeuOyT
@arachsys
arachsys / local.patch
Created Jun 18, 2012
Local git patches, not suitable for upstream
View local.patch
From 689d73b1f07425ce778362377f8f1bc0371033b1 Tue Jul 31 06:35:55 2012
Message-Id: <689d73b1f07425ce778362377f8f1bc0371033b1.1343719228.git.chris@arachsys.com>
From: Chris Webb <chris@arachsys.com>
Date: Thu, 15 Apr 2010 15:31:15 +0100
Subject: [PATCH 1/2] format-patch: use commit date in mbox 'From COMMIT DATE'
header line
Put the commit date in the 'From COMMIT DATE' header line instead of using
the fixed date 'Mon Sep 17 00:00:00 2001'. A DATE_UTC mode for show_date() is
introduced so we can easily generate this line in the correct format, and
@arachsys
arachsys / despotify.patch
Created Jun 16, 2012
Miscellaneous Despotify fixes
View despotify.patch
From 37075ed12045c9a45526799d3bf7e564c2536711 Mon Sep 17 00:00:00 2001
Message-Id: <37075ed12045c9a45526799d3bf7e564c2536711.1338408558.git.chris@arachsys.com>
From: Chris Webb <chris@arachsys.com>
Date: Mon, 21 May 2012 10:54:06 +0100
Subject: [PATCH 1/5] Simple handling of multi-disc albums
We append the tracks from any additional discs to treat multi-disc albums
as though they were one large disc.
Signed-off-by: Chris Webb <chris@arachsys.com>
@arachsys
arachsys / mutt-draft-msgid.patch
Created Jun 16, 2012
Fix Mutt's draft handling for git imap-send
View mutt-draft-msgid.patch
From 416eb783cf8b294f87f242ebfbf9aaa87a849763 Mon Sep 17 00:00:00 2001
Message-Id: <416eb783cf8b294f87f242ebfbf9aaa87a849763.1339836856.git.chris@arachsys.com>
From: Chris Webb <chris@arachsys.com>
Date: Sat, 16 Jun 2012 09:46:51 +0100
Subject: [PATCH] Fix draft handling for git imap-send
git format-patch generates a thread by setting Message-ID: on the first
message and References: & In-Reply-To: on subsequent messages. git imap-send
allows this thread to be appended to the Mutt drafts folder, ready to review,
edit and send. Unfortunately, Mutt strips Message-ID: when retrieving
@arachsys
arachsys / djbdns-1.05-getpeername.patch
Created Jun 12, 2012
Fix djbdns-1.05 to run correctly under inetd/skd/socat instead of daemontools
View djbdns-1.05-getpeername.patch
diff --git a/axfrdns.c b/axfrdns.c
index 7079850..b63cb58 100644
--- a/axfrdns.c
+++ b/axfrdns.c
@@ -1,3 +1,5 @@
+#include <sys/socket.h>
+#include <netinet/in.h>
#include <unistd.h>
#include "droproot.h"
#include "exit.h"
@arachsys
arachsys / dmrollback.c
Created Jun 12, 2012
Roll back an LVM2 logical volume to match an earlier snapshot
View dmrollback.c
#define _GNU_SOURCE
#include <byteswap.h>
#include <endian.h>
#include <fcntl.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define BLOCK_SIZE 512
@arachsys
arachsys / README
Created Jun 12, 2012
Motif XF/XS arpeggio and waveform mapping from 5pinDIN on motifator.com
View README
Many thanks to 5pinDIN from the motifator.com forum for compiling this
invaluable list.
Columns in arpeggios.csv are (in order)
- XF arpeggio number
- XF main category
- XF sub category
- XF arpeggio name
- XS arpeggio number (-1 if not available)
@arachsys
arachsys / airfilter
Created Jun 10, 2012
Filter out OpenAir airspace above specified flight level
View airfilter
#!/bin/perl -w
use strict;
sub emit($$) {
my ($ceiling, $stanza) = @_;
if ($stanza =~ /^AL (.*)/im and $1 =~ /^FL\s*(\d+)$/i) {
return if $1 >= $ceiling;
}
print $stanza;
@arachsys
arachsys / README
Created Jun 6, 2012
Yamaha YSFC file format
View README
Brief notes on the Yamaha-YSFC file format (version 1.0.2)
==========================================================
All Motif XF native files (X3A, X3G, X3V, etc) have an identical structure. The
extension just identifies which data types are contained within that structure
for the purposes of user interface.
32-bit and 16-bit quantities mentioned below are unsigned and stored in
big-endian byte ordering unless otherwise described.
@arachsys
arachsys / igctokml
Created May 30, 2012
Script to convert IGC files to KML for Google Maps
View igctokml
#!/bin/perl -w
use File::Basename;
use Getopt::Std;
use List::Util qw(sum);
use POSIX;
use XML::Generator;
use strict;
sub usage() {