Fun! The number at the end of the url controls the size of the picture (32-128). You can just replace some digits/letters in the hash to craft a new unicorn
Not sure exactly how to do it (not used mercurial in a long time), but I extracted the repository tarball to a directory then used hg clone to make the code usable/readable
I used https://unicornify.appspot.com/ (defunct) for avatars on my forum in its early days when I had other features to build beyond avatar upload. Until the unicornify service died, I used it for default avatars.
My users loved it, especially since it was generated from hash(userid, username). You'd sometimes get a unicorn grazing in the distance or one up close staring down the camera.
There were jokes about whether you were part of the green / blue / brown unicorn faction. And even years later, since it was the default avatar, people would joke about "fine, then remove your current avatar and see who you really are, I bet you're one of those filthy Greens!"
This sounds like a great alternative to SSH's RandomArt key visualizer. I can't memorize some opaque string of letters and numbers, but if keys are represented by unicorn avatars, changes would definitly be noticed.
Damn the worse news is the source isn't accessible because BitBucket now doesn't support Mercurial repos... as of yesterday they're not accessible :scream!
13 comments
[ 3.5 ms ] story [ 36.5 ms ] threadIt was here [0], for a while. Unfortunately...
> Go 1.9 is no longer available. Please refer to https://goo.gl/aESk5L for more information.
I think this [1] is a working Python implementation of the project.
[0] https://unicornify.appspot.com/
[1] https://github.com/codingisacopingstrategy/unicornify
Not sure exactly how to do it (not used mercurial in a long time), but I extracted the repository tarball to a directory then used hg clone to make the code usable/readable
The algorithm for generating a unicorn from a hash is quite interesting. It looks like the site is down, but thankfully the internet archive has a mirror https://web.archive.org/web/20100428132341/http://unicornify...
My users loved it, especially since it was generated from hash(userid, username). You'd sometimes get a unicorn grazing in the distance or one up close staring down the camera.
There were jokes about whether you were part of the green / blue / brown unicorn faction. And even years later, since it was the default avatar, people would joke about "fine, then remove your current avatar and see who you really are, I bet you're one of those filthy Greens!"
Good times.
I've tried reading the code on many occasions, but I don't think I'll ever understand graphics. https://github.com/codingisacopingstrategy/unicornify
require('unicornify')(hash, {width: 512, height: 512, format: 'png'}).readStream( (err,data)=>{ /* yeah baby, yeah! </austinpowers> */ });