This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# http://gist.github.com/gists/124242 | |
filename=ARGV[0] | |
abort "Usage: flac2mp3 FLACFILE" if filename.nil? | |
`metaflac --export-tags-to=- "#{filename}"`.each_line do |s| | |
v=s.strip.split '=', 2 | |
v[0].upcase! | |
v[1].gsub! '"', '\"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Enumerable | |
def frequencies | |
counts = Hash.new(0) | |
self.each{|item| counts[item] +=1} | |
return counts | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A very simple midi-keyboard with Shoes. | |
# No key-up Event. | |
# Set Keyboard layout here: | |
KEYBOARD_LAYOUT = :de # only :de and :us are supported, by now. See MidiKeymap#map_keys! | |
# | |
# You will need a midi input for this. | |
# On OSX you could use http://notahat.com/midi_patchbay | |
# and http://notahat.com/simplesynth or Garage Band | |
# | |
# enjoy. |