Skip to content

Instantly share code, notes, and snippets.

threedaymonk /
Last active Jul 4, 2020
Arduino IDE removal

How I worked out what the Arduino IDE was doing

Wrap each avr toolchain binary with a script that spies and reports on its command line arguments:

cd arduino-1.8.13/hardware/tools/avr
mv bin bin.real
mkdir bin
cd bin
cp path/to/wrapper .
chmod +x wrapper
threedaymonk /
Created Jan 14, 2020
Python barcode reader example
from import VideoStream
from pyzbar.pyzbar import decode
from pprint import pprint
import cv2
import time
vs = VideoStream(src=0).start()
threedaymonk /
Last active Oct 11, 2021
Roland SP-404SX sample format

Roland SP-404SX sample file format


Field types are marked using C-style notation:

  • char[4] indicates a 4-byte fixed-width string
  • uint[6] indicates a 6-byte sequence
  • uint8, uint16, and uint32 are unsigned byte, short, and long integers
  • int8, int16, and int32 are signed byte, short, and long integers
threedaymonk /
Last active Jun 18, 2021
Novation Launch Control Sysex


All sysex messages start with

Hex Field
F0 Start sysex
00 20 29 Manufacturer: Novation
02 Product type
0A Product ID
threedaymonk /
Last active Dec 31, 2019
Ubuntu post-install packages
sudo apt update
sudo apt install -y \
apt-file \
autoconf \
bison \
build-essential \
checkinstall \
View constitution.txt
Constitution of a Charitable Incorporated Organisation whose only voting
members are its charity trustees
(‘Foundation’ model constitution)
Date of constitution (last amended):
1. Name
threedaymonk / recipes.txt
Last active Jun 2, 2016
BBC Food recipe URLs
View recipes.txt
threedaymonk / annotate-failures.rb
Created Mar 29, 2016
Annotate failing Cucumber scenarios with @broken
View annotate-failures.rb
failures = {}\n/).each do |line|
matches = line.match(/\Acucumber ([^:]+):(\d+)/) or next
(failures[matches[1]] ||= []) << matches[2].to_i - 1
failures.each do |file, indices|
lines = File.readlines(file)
indices.reverse.each do |index|
indentation = lines[index][/\A\s+/]
threedaymonk / a
Last active Jan 20, 2016
Number of separate copies/versions of each npm module in the node_modules hierarchy
View a
Unique versions of each module
8 glob
8 async
7 qs
7 lodash
7 commander
6 source-map
5 uglify-js
5 strip-ansi