GitHub URL Shortener

Do you have a GitHub URL you’d like to shorten? Use!

$ curl -i -F "url="
HTTP/1.1 201 Created

$ curl -i
HTTP/1.1 302 Found

You can specify your own code to setup your own vanity URL:

$ curl -i -F "url=" \
    -F "code=t"
HTTP/1.1 201 Created

You can currently see in action on certain 3rd party services, such as Campfire.

The Code was written and deployed by myself and @atmos as a big experiment. Our goals:

  • Use Riak.
  • Deploy on Rackspace Cloud.

You can assemble your own with Guillotine, the URL shortening hobby kit. It’s written in Ruby as a Sinatra app, and supports storing links in Riak or a relational DB.

Though a URL shortener is about the easiest project one could take on, it gave us a chance to experiment. As a result, I’ve been able to spread my excitement about Riak to more people at GitHub. The Riak 1.0 upgrade gave us a chance to experiment with a rolling upgrade across our cluster (for the new version, and the new leveldb backend). We also have better support with our Hubot and puppet scripts for managing deployments through Rackspace Cloud.

Have feedback on this post? Let @github know on Twitter.
Need help or found a bug? Contact us.



Discover new ways to build better

Try Marketplace apps free for 14 days

Learn more