A URL shortener service in 45 lines of Scala
grasswire-engineering.tumblr.com
grasswire-engineering.tumblr.com
'pseudo' Python url shorterner in 14 lines of code:
from webapp2 import RequestHandler
import redis
def shorten_url(url):
import base64
return base64.encode(url)[:7]
class Handler(RequestHandler):
def get(self, path):
self.redirect(redis.get(path))
def post(self, path):
redis.put(path, shorten_url(path))Here is one I wrote long enough ago for me to be divorced from its implementation flaws: https://github.com/TShadwell/go-shorten/blob/master/shorten/...
You don't need to rely on routing through Twitter. Works when Twitter blocked or down. Branding.
Also tracking.
Also you can modify where the link points after distributing it in case you notice a mistake.
and really it both sucks, which is why many print magazines collect an edition's links on a special page like magazinename.com/2014/5.
There's also a presentation to go with it: http://vimeo.com/59109358