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
spaced about 2-3 hours apart. | |
1/2 cup quaker oats + hot water + a few drops of honey | |
5 egg whites | |
1/2 grapefruit | |
repeat next meal twice: | |
1 chicken breast | |
handful of broccoli w/ stems | |
half an avocado |
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
describe SomeClass do | |
freeze { 1.day.from_now } | |
it "does some stuff with time" do | |
end | |
end | |
# this actually does... | |
describe SomeClass do | |
before { Timecop.freeze(1.day.from_now) } |
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
gem install ruby-debug19 -- --with-ruby-include=$rvm_path/src/ruby-1.9.2-head/ |
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
Emoji: { | |
'sunny': '2600', | |
'zap': '26a1', | |
'leaves': '1f343', | |
'lipstick': '1f483', | |
'cop': '1f46c', | |
'wheelchair': '267f', | |
'fish': '1f413', | |
'hammer': '1f52c', |
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
### | |
# Read in XML as a stream, write out JSON as a stream. As little information | |
# is kept in memory as possible. | |
require 'nokogiri' | |
require 'psych' | |
class JSONTranslator < Nokogiri::XML::SAX::Document | |
attr_reader :emitter | |
def initialize emitter |
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 | |
new_tags_file="$TMPDIR/tags-$RANDOM" | |
ctags --tag-relative -Rf $new_tags_file --exclude=.git --languages=-javascript,sql | |
mv "$new_tags_file" .git/tags |
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 | |
#/ Usage: clean-merged-branches [-f] | |
#/ Delete merged branches from the origin remote. | |
#/ | |
#/ Options: | |
#/ -f Really delete the branches. Without this branches are shown | |
#/ but nothing is deleted. | |
set -e | |
# show usage maybe |
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
class PostCreationContext | |
def initialize(post) | |
@post = post | |
@post.extend PostNotifier | |
@post.extend PostIndexer | |
@post.extend PostCacher | |
end | |
def execute | |
@post.save |
OlderNewer