Skip to content

Instantly share code, notes, and snippets.

@kill9zombie
kill9zombie / mix_test_loop.fish
Created June 1, 2016 15:50
Run Elixir's 'mix test' in a loop, triggered by file changes.
function mix_test_loop --description "Run 'mix test' in a loop, triggered by file changes"
# file: ~/.config/fish/functions/mix_test_loop.fish
#
# Run 'mix test' in a loop. We'll only update the screen when an elixir file
# changes.
#
# usage: mix_test_loop 5
#
# Where the second argument is the number of seconds to wait
# before starting the loop again. Defaults to 5 seconds.
function rspec_loop --description "Run RSpec in a loop, triggered by file changes"
# file: ~/.config/fish/functions/rspec_loop.fish
#
# Run rspec in a loop. We'll only update the screen when a ruby file
# changes.
#
# usage: rspec_loop 5
#
# Where the second argument is the number of seconds to wait
# before starting the loop again. Defaults to 10 seconds.
@kill9zombie
kill9zombie / drb_server.rb
Created March 28, 2016 19:31
MIDI control connection for Sonic Pi
#!/usr/bin/env ruby
# encoding: utf-8
require 'drb/drb'
require 'micromidi'
# The URI we're using for RDb, we use unix sockets just because they're quicker.
DRB_URI="drbunix:/var/tmp/sonic-pi-midiconnector"
class SPIMidiConnector