Created
September 2, 2011 20:45
-
-
Save natebenes/1189867 to your computer and use it in GitHub Desktop.
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
def profile_pic(email,size) | |
digest = Digest::MD5.hexdigest(email,size) | |
# we want to allow parallel downloads, | |
# but we don't want to bust caches | |
if(%w(0 1 2 3 4 5 6 7).include? digest[0]) | |
host = "img0" | |
else | |
host = "img1" | |
end | |
return "http://" + host + ".lnkherd.com/avatar/" + digest + "?s=" + size + "&r=pg&d=retro" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment