Skip to content

Instantly share code, notes, and snippets.

@todbot
todbot / synthio_midi_synth.py
Last active December 27, 2025 05:31
pretty usable MIDI-controlled synth using synthio in CircuitPython
# synthio_midi_synth.py - pretty usable MIDI-controlled synth using synthio in CircuitPython
# 11 May 2023 - @todbot / Tod Kurt
# Uses cheapie PCM5102 DAC on QTPY RP2040
# Video demo: https://www.youtube.com/watch?v=N-PbbWWDE6k
# Features:
# - midi velocity controls attack rate (gentle press = slow, hard press = fast)
# - notes have small random detune on all oscillators to reduce phase stacking
# - adjustable number of detuned oscillators per note 1-5 (midi controller 83)
# - five selectable waveforms: saw, squ, sin, noisy sin, noise (midi controller 82)
# - vibrato depth on mod wheel (midi controller 1)
@machuu
machuu / WSL2_VPN_Workaround_Instructions.md
Last active May 5, 2026 16:15
Workaround for WSL2 network broken on VPN

Overview

Internet connection and DNS routing are broken from WSL2 instances, when some VPNs are active.

The root cause seems to be that WSL2 and the VPN use the same IP address block, and the VPN routing clobbers WSL2's network routing.

This problem is tracked in multiple microsoft/WSL issues including, but not limited to:

@ofen
ofen / _helper.tpl
Last active March 31, 2026 11:05
Helm helper to convert label map to comma-separated string
{{/*
Convert labels to string like: key1="value1", key2="value2", ...
*/}}
{{- define "chart.external_labels" -}}
{{- $list := list -}}
{{- range $k, $v := .Values.external_labels -}}
{{- $list = append $list (printf "%s=\"%s\"" $k $v) -}}
{{- end -}}
{{ join ", " $list }}
{{- end -}}
@olih
olih / jq-cheetsheet.md
Last active June 25, 2026 07:27
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@superjamie
superjamie / raspberry-pi-vpn-router.md
Last active October 6, 2025 20:22
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

#cloud-config
coreos:
etcd:
discovery: https://discovery.etcd.io/stuff
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
units:
- name: fleet-metadata.service
command: start
@micw
micw / install_jenkins_plugin.sh
Last active January 29, 2026 13:49
Script to install one or more jenkins plugins including dependencies while jenkins is offline
#!/bin/bash
set -e
if [ $# -eq 0 ]; then
echo "USAGE: $0 plugin1 plugin2 ..."
exit 1
fi
plugin_dir=/var/lib/jenkins/plugins