Skip to content

Instantly share code, notes, and snippets.

Arguing with computers.

Brett Buddin brettbuddin

Arguing with computers.
View GitHub Profile
View git-cut-branch
# Usage: git-cut-branch <name>
# Create a new branch named <name> pointed at HEAD and reset the current branch
# to the head of its tracking branch. This is useful when working on master and
# you realize you should be on a topic branch.
set -e
# bail out with message to stderr and exit status 1
die() {
echo "$(basename $0):" "$@" 1>&2
brettbuddin /
Created Apr 13, 2020
Script to dump goroutine stack traces from Pods in Kubernetes.
#!/usr/bin/env zsh
if [ "$#" -ne 2 ]; then
echo "dump-pod-goroutines <labels> <port>"
exit 1
brettbuddin / resample.go
Created Jun 4, 2019
Upsample via time domain.
View resample.go
package fourier
import "errors"
func Upsample(in []float64, scale int) ([]float64, error) {
if scale < 1 {
return nil, errors.New("scale cannot be less than one")
var (
brettbuddin / Gemfile
Created Feb 4, 2019
EricaSynths Pico Drum Samples for Expert Sleepers Disting
View Gemfile
# frozen_string_literal: true
source ""
git_source(:github) {|repo_name| "{repo_name}" }
gem 'msgpack'
gem 'wavefile'
brettbuddin / downtime.lisp
Last active Sep 10, 2018
GopherCon 2018 Lightning Talk Patches for Shaden
View downtime.lisp
(define clock (unit/clock))
(define clock/div/2 (unit/clock-div (table :div 2)))
(define clock/div/4 (unit/clock-div (table :div 4)))
(define clock/div/8 (unit/clock-div (table :div 8)))
(define clock/div/16 (unit/clock-div (table :div 16)))
(define clock/mult/2 (unit/clock-mult (table :mult 2)))
(-> clock
(table :tempo (hz 3)
:shuffle 0))
shaden -backend=stdout -gain=-6 examples/krell.lisp | lame --replaygain-accurate -m s -r --preset standard --verbose - output.mp3

Keybase proof

I hereby claim:

  • I am brettbuddin on github.
  • I am brettbuddin ( on keybase.
  • I have a public key whose fingerprint is F1E8 3271 C98D 4FCA CD22 C8E6 D3C8 3DE6 20F2 C4CB

To claim this, I am signing this object:

#!/bin/bash -eu
CURRENT_IMAGE=$(osascript -e 'tell app "finder" to get posix path of (get desktop picture as alias)')
mkdir -p $WALLCAT_PATH
View gist:2966084
$ ssh root@
$ mntroot rw
$ mkdir /mnt/us/screensaver
$ mount /dev/mmcblk0p1 /mnt/base-mmc
$ mv /mnt/base-mmc/opt/amazon/screen_saver/600x800 /mnt/base-mmc/opt/amazon/screen_saver/600x800.old
$ ln -sfn /mnt/us/screensaver /mnt/base-mmc/opt/amazon/screen_saver/600x800
$ mntroot ro
$ exit
View gist:2903136
› go install
› bot -adapter campfire -name virbot
2012/06/09 19:45:23 Starting up...
2012/06/09 19:45:24 Fetched room info.
2012/06/09 19:45:24 Remembering: Brett Buddin
2012/06/09 19:45:24 Joined room.
2012/06/09 19:45:24 Listening...
2012/06/09 19:45:33 Listener /^(virbot[:,]?)\s*(?:(image|img) (.*))/ triggered by 'virbot img what'