Skip to content

Instantly share code, notes, and snippets.

Paul Battley threedaymonk

Block or report user

Report or block threedaymonk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@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 26, 2019
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 Oct 5, 2019
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
@threedaymonk
threedaymonk / benchmarking.rb
Created Oct 8, 2015
Ruby benchmarking example
View benchmarking.rb
require "benchmark"
Benchmark.benchmark do |b|
b.report("Some job"){ do_some_job }
b.report("Another job"){ do_another_job }
end
View bind.js
if (!Function.prototype.bind) {
Function.prototype.bind = function bind(thisValue){
var func = this;
return function() {
return func.apply(thisValue, arguments);
}
}
}
You can’t perform that action at this time.