Skip to content

Instantly share code, notes, and snippets.

View 00README.md
@threedaymonk
threedaymonk / instructions.md
Last active Jul 4, 2020
Arduino IDE removal
View instructions.md

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
threedaymonk / detect.py
Created Jan 14, 2020
Python barcode reader example
View detect.py
#!/usr/bin/python3
from imutils.video import VideoStream
from pyzbar.pyzbar import decode
from pprint import pprint
import cv2
import time
vs = VideoStream(src=0).start()
time.sleep(1.0)
@threedaymonk
threedaymonk / format.md
Last active Oct 11, 2021
Roland SP-404SX sample format
View format.md

Roland SP-404SX sample file format

Notes

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
threedaymonk / sysex.md
Last active Jun 18, 2021
Novation Launch Control Sysex
View sysex.md

General

All sysex messages start with

Hex Field
F0 Start sysex
00 20 29 Manufacturer: Novation
02 Product type
0A Product ID
@threedaymonk
threedaymonk / post-install.sh
Last active Dec 31, 2019
Ubuntu post-install packages
View post-install.sh
#!/bin/bash
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
threedaymonk / recipes.txt
Last active Jun 2, 2016
BBC Food recipe URLs
View recipes.txt
http://www.bbc.co.uk/food/recipes/10minutepizza_87314
http://www.bbc.co.uk/food/recipes/15_minute_pasta_33407
http://www.bbc.co.uk/food/recipes/3d_biscuits_29555
http://www.bbc.co.uk/food/recipes/3wayswithlemoncurd_67266
http://www.bbc.co.uk/food/recipes/_81487
http://www.bbc.co.uk/food/recipes/aberdeenbutteriesrow_92370
http://www.bbc.co.uk/food/recipes/abundant_steamed_sea_22932
http://www.bbc.co.uk/food/recipes/acaciahoneyglazedchi_83634
http://www.bbc.co.uk/food/recipes/ackeeandsaltfish_86812
http://www.bbc.co.uk/food/recipes/aclassicspongecakewi_9406
@threedaymonk
threedaymonk / annotate-failures.rb
Created Mar 29, 2016
Annotate failing Cucumber scenarios with @broken
View annotate-failures.rb
failures = {}
ARGF.read.split(/\n/).each do |line|
matches = line.match(/\Acucumber ([^:]+):(\d+)/) or next
(failures[matches[1]] ||= []) << matches[2].to_i - 1
end
failures.each do |file, indices|
lines = File.readlines(file)
indices.reverse.each do |index|
indentation = lines[index][/\A\s+/]
@threedaymonk
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