This file contains hidden or 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
$ rake --trace db:test:prepare | |
** Invoke db:test:prepare (first_time) | |
** Execute db:test:prepare | |
$ rake --trace test:prepare | |
** Invoke test:prepare (first_time) | |
** Invoke db:test:prepare (first_time) | |
** Execute db:test:prepare | |
** Invoke db:test:load (first_time) | |
** Invoke db:test:purge (first_time) |
This file contains hidden or 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 ReadableBigDecimal | |
def inspect | |
"<#{self.class.name}: #{self.to_f}>" | |
end | |
end | |
BigDecimal(10) # => #<BigDecimal:7fcd7103ee68,'0.1E2',9(36)> | |
BigDecimal.send(:prepend, ReadableBigDecimal) | |
BigDecimal(10) # => #<BigDecimal: 10> |
This file contains hidden or 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
class TeeIO | |
# TeeIO will write to each of these IOs when it is written to. | |
def initialize(*ios) | |
@ios = ios | |
end | |
def write(data) | |
@ios.each { |io| io.write(data) } | |
end |
This file contains hidden or 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
var ids = [...]; | |
rottenTweets; | |
_(ids).each(function(id) { | |
getTweet(id, function(tweetBody) { | |
rot13(tweetBody, function(rottenTweet) { | |
rottenTweets.push(rottenTweet); | |
if (rottenTweets.length == ids.length) { | |
useRottenTweets(); |
This file contains hidden or 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 program which outputs "error" to STDERR and "output" to STDOUT. | |
a_program() { | |
echo error >&2 | |
echo output | |
} | |
# Run a_program. | |
# - Redirect a_program's STDERR (file descriptor 2) to the STDIN of a tee process. | |
# - tee echoes its STDIN to the given filename and to its STDOUT. | |
# - Redirect tee's STDOUT to its STDERR. |
This file contains hidden or 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
Gemfile.lock |
This file contains hidden or 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
# Fix pbcopy etc. | |
set-option -g default-command "reattach-to-user-namespace -l zsh" | |
# act like vim | |
setw -g mode-keys vi | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R |
This file contains hidden or 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
task :foo do | |
sh 'echo $FOO' | |
end |
This file contains hidden or 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
The command you ran: | |
$ rails runner ';' | |
Exception backtrace(s), if any: (warnings, in this case) | |
/Users/peeja/.rbenv/versions/1.9.3-p125/lib/ruby/1.9.1/x86_64-darwin11.2.0/psych.bundle: warning: already initialized constant ANY | |
/Users/peeja/.rbenv/versions/1.9.3-p125/lib/ruby/1.9.1/x86_64-darwin11.2.0/psych.bundle: warning: already initialized constant UTF8 | |
/Users/peeja/.rbenv/versions/1.9.3-p125/lib/ruby/1.9.1/x86_64-darwin11.2.0/psych.bundle: warning: already initialized constant UTF16LE | |
/Users/peeja/.rbenv/versions/1.9.3-p125/lib/ruby/1.9.1/x86_64-darwin11.2.0/psych.bundle: warning: already initialized constant UTF16BE | |
/Users/peeja/.rbenv/versions/1.9.3-p125/lib/ruby/1.9.1/x86_64-darwin11.2.0/psych.bundle: warning: already initialized constant ANY | |
/Users/peeja/.rbenv/versions/1.9.3-p125/lib/ruby/1.9.1/x86_64-darwin11.2.0/psych.bundle: warning: already initialized constant UTF8 |
This file contains hidden or 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
source :rubygems | |
gem 'rake' | |
gem 'rspec', '2.12.0' | |
gem 'rcov' |