Skip to content

Instantly share code, notes, and snippets.

View rick's full-sized avatar
🎧
Quietly doing

Rick Bradley rick

🎧
Quietly doing
View GitHub Profile
~/git/words-music-new on master $ type ts
ts is a function
ts ()
{
AUTOTEST=${1:-.} autotest
}
15:51 vinbarnes: pipe surveyor
15:52 vinbarnes: pipe miser
15:52 vinbarnes: pipe roper
16:02 rickbradley: pipe sprayer
16:17 vinbarnes: pipe peddler
16:22 rickbradley: pipe strapper
16:30 vinbarnes: pipe gobbler
16:31 rickbradley: pipe fitter
16:31 rickbradley: pipe fiddler
16:34 vinbarnes: pipe cocotte
~$ freshtrack mbm --after 2008-09-01
/opt/local/lib/ruby/gems/1.8/gems/freshtrack-0.2.1/lib/freshtrack.rb:59:in `times_to_dates': undefined method `to_date' for "Commad 'lst' ukow":String (NoMethodError)
from /opt/local/lib/ruby/gems/1.8/gems/freshtrack-0.2.1/lib/freshtrack.rb:55:in `each'
from /opt/local/lib/ruby/gems/1.8/gems/freshtrack-0.2.1/lib/freshtrack.rb:55:in `times_to_dates'
from /opt/local/lib/ruby/gems/1.8/gems/freshtrack-0.2.1/lib/freshtrack.rb:50:in `condense_time_data'
from /opt/local/lib/ruby/gems/1.8/gems/freshtrack-0.2.1/lib/freshtrack.rb:46:in `convert_time_data'
from /opt/local/lib/ruby/gems/1.8/gems/freshtrack-0.2.1/lib/freshtrack.rb:41:in `get_time_data'
from /opt/local/lib/ruby/gems/1.8/gems/freshtrack-0.2.1/lib/freshtrack.rb:78:in `get_data'
from /opt/local/lib/ruby/gems/1.8/gems/freshtrack-0.2.1/lib/freshtrack.rb:82:in `track'
from /opt/local/lib/ruby/gems/1.8/gems/freshtrack-0.2.1/bin/freshtrack:23
return /opt/local/lib/ruby/gems/1.8/gems/earworm-0.0.2/lib/earworm/fingerprint.rb:74 id3_info_for Earworm::Fingerprint
c-call /opt/local/lib/ruby/gems/1.8/gems/earworm-0.0.2/lib/earworm/fingerprint.rb:29 merge Hash
c-call /opt/local/lib/ruby/gems/1.8/gems/earworm-0.0.2/lib/earworm/fingerprint.rb:29 initialize_copy Hash
c-return /opt/local/lib/ruby/gems/1.8/gems/earworm-0.0.2/lib/earworm/fingerprint.rb:29 initialize_copy Hash
c-return /opt/local/lib/ruby/gems/1.8/gems/earworm-0.0.2/lib/earworm/fingerprint.rb:29 merge Hash
line /opt/local/lib/ruby/gems/1.8/gems/earworm-0.0.2/lib/earworm/fingerprint.rb:32 to_hash Earworm::Fingerprint
call /opt/local/lib/ruby/gems/1.8/gems/earworm-0.0.2/lib/earworm/fingerprint.rb:90 decode_mp3 Earworm::Fingerprint
line /opt/local/lib/ruby/gems/1.8/gems/earworm-0.0.2/lib/earworm/fingerprint.rb:90 decode_mp3 Earworm::Fingerprint
c-call /opt/local/lib/ruby/gems/1.8/gems/earworm-0.0.2/lib/earworm/fingerprint.rb:90 new
& Wed Oct 15 22:11:04 rick@rerun
/audio/mp3/various$ ls | grep -e 80 -e eight
18_screamers_from_the_80_s
80_s_greatest_hits_dance_all
alterno-daze_-_80_s_survival
awesome_80_s
best_of_80_s_rock_-_volume_1
eighties_pop
greatest_rock_hits_of_the_80s
greatest_rock_hits_the_80_s_t
~/git/mbm on master $ ruby script/console
Loading development environment (Rails 2.1.0)
>> require 'base64'
=> []
>> y = Base64.decode64('BAh7BzoOcmV0dXJuX3RvMCIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6
Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA==--36a92ec1985014c08fe0beab8cd25119a04bf5f5')
=> "\004\b{\a:\016return_to0"\nflashIC:'ActionController::Flash::FlashHash{\000\006:\n@used{\000"
>> Marshal.load(y)
=> {"flash"=>{}, :return_to=>nil}
>> x = Base64.decode64('BAh7CToJdXNlcmlCOgxhY2NvdW50aQk6DnJldHVybl90bzAiCmZsYXNoSUM6
@rick
rick / hack
Created October 17, 2008 23:29
#!/bin/sh -x
CURRENT=`git branch | grep '\*' | awk '{print $2}'`
git checkout master
git pull origin master
git checkout ${CURRENT}
git rebase master
@rick
rick / custom_matchers.rb
Created November 2, 2008 22:26
thinking sphinx custom rspec matchers
module ThinkingSphinxIndexMatcher
class HaveIndex
def initialize(expected)
@expected = expected
end
def matches?(target)
@target = target
target.sphinx_indexes.collect(&:fields).flatten.collect(&:columns).flatten.collect(&:__name).include?(@expected)
end
# Welcome to dircproxy!
#
# This is an example configuration file, you can use it as a template to
# write your own. Copy it to your home directory and name it
# .dircproxyrc to get it automatically picked up when you run dircproxy.
#
# You can also place it as /usr/local/etc/dircproxyrc if you want it globally
# installed, or anywhere else and load it with the -f parameter
#
# Before dircproxy will start you need to define a number of connection
#!/usr/bin/env ruby
require 'rubygems'
require 'midiator'
midi = MIDIator::Interface.new
midi.autodetect_driver
include MIDIator::Notes