I always wanted my own URL shortener. There pretty damn sweet – like me.
I grabbed a domain from Blacknight – http://bkenn.me and installed some sweet assed Yourls. I noticed it was a rather pain in the ass to hit up the admin interface and shorten some links.
I spend much of my time in the terminal – so I ruby’d some shit. First of all much love to threestage for their yourls gem.
This allowed me to rub for example
ruby shorten.rb http://url.to/shorten
Boring – lets shorten that up some more.
vim ~/.bash_profile
Then add in some niceness
shorten () { ruby ~/shorten.rb $1}
Done! I can now go to any of my terminals and type “shorten http://www.whatever.com” and it’ll be in my clipboard ready to paste.
