Skip to content

Instantly share code, notes, and snippets.

View gertig's full-sized avatar

Andrew Gertig gertig

View GitHub Profile
##
# Inside: Rails.root/config/compass.rb
if Rails.env.production?
css_dir = "tmp/stylesheets/compiled"
else
css_dir = "public/stylesheets/compiled"
end
##
# Inside: Rails.root/config/initializers/compass.rb
@gertig
gertig / gist:817199
Created February 8, 2011 20:46 — forked from Arcath/gist:481321
def gravatar_url(email,options = {})
require 'digest/md5'
hash = Digest::MD5.hexdigest(email)
url = "http://www.gravatar.com/avatar/#{hash}"
options.each do |option|
option == options.first ? url+="?" : url+="&"
key = option[0].to_s
value = option[1].to_s
url+=key + "=" + value
end