A little experiment to see how many characters could be used in a link shortener's path. I think it ends up being "base 78":
AllYour.base(78).decode('/~path/2/nowhere')
# => 288757223154835410767515610539
Binary encoding also fell out for free:
AllYour.base(:binary).encode(42)
# => "101010"