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
(function() { | |
// Notes from http://news.ycombinator.com/item?id=1952531 | |
var notes = { | |
"suspended cymbal":"zk", | |
"snare":"bschk", | |
"brush":"pv", | |
"bass":"bk", | |
"flam1":"tk", | |
"roll tap":"vk", | |
"flam2":"kt", |
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
$ irb | |
>> require 'rubygems' | |
=> false | |
>> require 'geokit' | |
=> true | |
>> Geokit::Geocoders::GoogleGeocoder.reverse_geocode([45,12]).state | |
=> "Veneto" |
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
type rvm | head -1 |
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
logger.debug "Date.yesterday: #{Date.yesterday.inspect}" | |
logger.debug "date: #{date.inspect}" | |
logger.debug "date == Date.yesterday: #{date == Date.yesterday}" | |
logger.debug "date.to_date: #{date.to_date.inspect}" | |
logger.debug "date.to_date == Date.yesterday: #{date.to_date == Date.yesterday}" | |
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
{ | |
"entry":{ | |
"minutes": "25min", | |
"date": "2011-07-25", | |
"description": "one, two", | |
"user": "gcappellotto@letsfreckle.com" | |
} | |
} |
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
require 'open-uri' | |
(1..700).each do |factor| | |
threads = [] | |
(1..100).each do |id| | |
threads << Thread.new(id+100*factor) { |image_id| | |
log = "#{image_id} opening image... " | |
begin |
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
git config --global color.diff auto | |
git config --global color.status auto | |
git config --global color.branch auto |
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
require 'rubygems' | |
require 'term/ansicolor' | |
COLORS = ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white'] | |
class String | |
include Term::ANSIColor | |
end | |
(0..15).each do |x| |
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
#!/bin/sh | |
for i in $(ls -r -t /System/Library/Speech/Voices/ | awk -F'.' '{print $1}'); do | |
echo $i | |
say -v $i "Hi, I'm $i" | |
done |
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
<% [:notice, :error, :alert].each do |level| %> | |
<% unless flash[level].blank? %> | |
<div class="alert-message <%= flash_class(level) %>"> | |
<a class="close" href="#">×</a> | |
<%= content_tag :p, flash[level] %> | |
</div> | |
<% end %> | |
<% end %> |