Skip to content

Instantly share code, notes, and snippets.

@robmckinnon
robmckinnon / index.html
Created August 14, 2023 14:12 — forked from tomgp/index.html
topojson neighborhoods
<!DOCTYPE html>
<meta charset="utf-8">
<title>topojson neighbourhood</title>
<style>
body{
font-family: sans-serif;
}
svg{
border:1px solid #000;
mkdir -p nz-electoral-reform/royal-commission-report-1986/pdf
cd nz-electoral-reform/royal-commission-report-1986/pdf
curl -o 01.pdf https://elections.nz/assets/Report-of-the-Royal-Commission-on-the-Electoral-System-1986/Royal-Commission-Report-Contents.pdf
curl -o 02.pdf https://elections.nz/assets/Report-of-the-Royal-Commission-on-the-Electoral-System-1986/Chapter-1-preface-and-introduction.pdf
curl -o 03.pdf https://elections.nz/assets/Report-of-the-Royal-Commission-on-the-Electoral-System-1986/Chapter-2-the-voting-system.pdf
curl -o 04.pdf https://elections.nz/assets/Report-of-the-Royal-Commission-on-the-Electoral-System-1986/Chapter-3-maori-representation-v2.pdf
@robmckinnon
robmckinnon / diatonic_scales.orca
Created January 11, 2021 22:21
Diatonic scales patch for Orca
0VC6VftV2#:tone#......#M#.#D#.#P#.#L#.#M#.#M#.#L#......................................
1Vc7VGsV1#:semitone#..#a#.#o#.#h#.#y#.#i#.#i#.#y#......................................
2VD8Vg................#j#.#r#.#r#.#d#.#x#.#n#.#c#......................................
3Vd9VAkV0#:key.index#.#o#.#i#.#y#.#i#.#o#.#o#.#r#......................................
4VEaVa................#r#.#a#.#g#.#a#.#l#.#r#.#i#......................................
5VFbVB.................................................................................
......7Xt.#To.change#.#t#.#t#.#s#.#t#.#t#.#s#.#t#......................................
.....57Xt.#mode.copy#.#t#.#s#.#t#.#t#.#t#.#t#.#t#......................................
.....a7Xs.#sequence.#.#s#.#t#.#t#.#t#.#s#.#t#.#s#......................................
.....f7Xt.#from.the.#.#t#.#t#.#t#.#s#.#t#.#s#.#t#......................................
import time
import rtmidi
from gpiozero import DistanceSensor # Import the GPIO Zero Library
# Define GPIO pins to use on the Pi
pinTrigger = 17
pinEcho = 18
midiout = rtmidi.MidiOut()
available_ports = midiout.get_ports()
@robmckinnon
robmckinnon / memory_profiler.rb
Created February 27, 2020 21:24
memory_profiler.rb in single file
# frozen_string_literal: true
# Single file copy of https://github.com/SamSaffron/memory_profiler for loading in Sonic Pi.
# Licence: https://github.com/SamSaffron/memory_profiler/blob/master/LICENSE.txt
# Copyright (c) 2013 Sam Saffron
# MIT License
module MemoryProfiler
VERSION = "0.9.14"
end
@robmckinnon
robmckinnon / raspberry-pi-setup.sh
Last active October 3, 2019 13:38
raspberry pi buster setup
cp wpa_supplicant.conf /Volumes/boot/
touch ssh
cp ssh /Volumes/boot
ssh pi@raspberrypi.local
# raspberry
passwd
# new p/w
exit
ssh pi@raspberrypi.local
sudo raspi-config
@robmckinnon
robmckinnon / store
Last active October 24, 2018 10:33
store
{
"@id": "https://gist.github.com/robmckinnon/f6a2dcc02e98a66c74a50d7bc44e9c72/raw/store",
"@type": "Store",
"name": "Links Bike Shop",
"description": "The most \"linked\" bike store on earth!",
"product": [
{
"@id": "https://gist.githubusercontent.com/robmckinnon/f6f85a7708f24c3736de3ae4a93bd6ce/raw/links-swift-chain",
"@type": "Product",
"name": "Links Swift Chain",
@robmckinnon
robmckinnon / links-swift-chain
Last active October 24, 2018 10:29
links-swift-chain
@robmckinnon
robmckinnon / store.jsonld
Created October 24, 2018 10:09
store.jsonld
{
"@id": "http://store.example.com/",
"@type": "Store",
"name": "Links Bike Shop",
"description": "The most \"linked\" bike store on earth!",
"product": [
{
"@id": "p:links-swift-chain",
"@type": "Product",
"name": "Links Swift Chain",