Public Gists by gravis

Gravatar
Thu Sep 17 00:55:15 -0700 2009
1
2
3
$ sudo gem list hanna
 
*** LOCAL GEMS ***
Gravatar
Wed Sep 16 08:37:08 -0700 2009
1
2
3
$ cat .gemrc
---
:verbose: true
Gravatar
Wed Jun 03 02:10:42 -0700 2009
1
2
3
# Open in the default browser the page being "seen" by webrat, when a cucumber feature fails:
# Credits go to Ben Mabey (cf http://groups.google.com/group/cukes/browse_thread/thread/c5c3c73e469382d6)
 
Gravatar
Wed Apr 15 05:34:04 -0700 2009
1
2
3
# Render a timestamp suitable for javascript substitution (jquery.timeago)
# Sorry for copyright, I can't remember where I found this piece of code ! Do not hesitate to claim it
 
Gravatar
Fri Apr 10 06:30:40 -0700 2009
1
2
3
# Fix the issue with domain cookie sessions in rails 2.3.
# Put this in your environment file (config/environment/staging.rb for me)
 
Gravatar
Tue Mar 31 09:13:05 -0700 2009
1
2
3
%script{ :src => "http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php", :type => "text/javascript" }
:javascript
  //<![CDATA[
Gravatar
Thu Mar 05 02:28:13 -0800 2009
1
2
3
# Taken from Thoughtbot-shoulda
# Put me in RAILS_ROOT/test/shoulda_macros/xml.rb
 
Gravatar
Sun Feb 22 13:24:39 -0800 2009
1
2
3
You can represent time statements in most western languages where
a prefix and/or suffix is used.
 
gist: 55084 Calculate sum of a Hashed cart
Gravatar
Fri Jan 30 06:23:09 -0800 2009
1
2
3
# make sure cart is composed of integers first.
 
# Without AR finding :
gist: 55081 Convert keys and values to ...
Gravatar
Fri Jan 30 06:12:19 -0800 2009
1
2
3
# convert a hash composed of strings to integers
# ex: h = {"1" => "2", "3" => "4"}
# I want {1 => 2, 3 => 4}