Last active
December 11, 2015 05:58
-
-
Save 3rd-Eden/4555643 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
.3rdeden { | |
background-image: url(gravatar('[email protected]', '[email protected]')) | |
} | |
// generates a valid gravatar that defaults to company e-mail and then a known github e-mail |
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
// | |
// Generates an MD5 hash from the data | |
// | |
md5(data) | |
eval("require('crypto').createHash('md5').update('"+ data +"').digest('hex')") | |
// | |
// Generates valid | |
// | |
gravatar(regular, fallback, size=20) | |
regular = md5(regular) | |
fallback = md5(fallback) | |
'https://secure.gravatar.com/avatar/'+ regular +'?s='+ size +'&d=https//secure.gravatar.com/avatar/'+ fallback +'?s='+ size |
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
stylus.define('eval', function evil(str) { | |
return new stylus.nodes.String(eval(str.val)); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment