Skip to content

Instantly share code, notes, and snippets.

View nhance's full-sized avatar
💭
⛑ Software Rescueman

Nicholas Hance nhance

💭
⛑ Software Rescueman
View GitHub Profile
@nhance
nhance / 0_reuse_code.js
Created January 31, 2014 14:03
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@nhance
nhance / innocent_looking_file.rb
Created October 3, 2012 13:35
Misleading heredoc can fool even expert ruby coders
EOF = 0
def grocery(list)
puts "We've stolen #{list}"
end
def list
"your credit card"
end
@nhance
nhance / method_logger.rb
Created September 6, 2012 12:58
Rails compatible method logging. Use this to log all calls to instance methods of a class to the log.
Model.new.foo

👍 +1 👎 -1 ✈️ airplane 🍎 apple 🎨 art 🐻 bear 🍺 beer 🚲 bike 💣 bomb 📖 book

@nhance
nhance / gist:1288108
Created October 14, 2011 19:44
spree/spree failure on master
########################### api|sqlite3 (features) ###########################
cd api && bundle exec cucumber -p ci
Using the ci profile...
/Users/enhanced/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.4/lib/rack/backports/uri/common_192.rb:53: warning: already initialized constant WFKV_
[DEPRECATION WARNING] Nested I18n namespace lookup under "activerecord.attributes.order" is no longer supported
...........................................................................F-...............................................
(::) failed steps (::)
expected: 1