Create unique long URL's out of A's (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.com) 17 points by bubblehack3r 5y ago ↗ HN
[–] theamk 5y ago ↗ sample: http://aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... http://aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.com/AaAAAaaaAAaaAAAaAAaa
[–] codemonkey-zeta 5y ago ↗ Nice hack kid! Very clevel and VERY simple, though maybe not very practical.
[–] server_bot 5y ago ↗ I love how whimsical this is, made me smile! It's refreshing to see a silly hack that isn't also performative self-promotion.
[–] windthrown 5y ago ↗ The associated Github repository: https://github.com/programming/aaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
[–] jolmg 5y ago ↗ If the point is to lengthen, they could just encode the URL instead of saving it and returning a key. That way it'd be stateless. Something like: $ ruby -pe '$_.gsub!(/./) {|c| ("%08b" % c.ord).tr("01", "Aa") }' <<< http://google.com AaaAaAAAAaaaAaAAAaaaAaAAAaaaAAAAAAaaaAaAAAaAaaaaAAaAaaaaAaaAAaaaAaaAaaaaAaaAaaaaAaaAAaaaAaaAaaAAAaaAAaAaAAaAaaaAAaaAAAaaAaaAaaaaAaaAaaAa Then to decode: $ ruby -pe '$_.gsub!(/.{8}/) {|s| s.tr("Aa", "01").to_i(2).chr }' <<< AaaAaAAAAaaaAaAAAaaaAaAAAaaaAAAAAAaaaAaAAAaAaaaaAAaAaaaaAaaAAaaaAaaAaaaaAaaAaaaaAaaAAaaaAaaAaaAAAaaAAaAaAAaAaaaAAaaAAAaaAaaAaaaaAaaAaaAa http://google.com EDIT: Wow. I hadn't noticed that HN got rid of the horizontal scrolling behaviour for indented text. It's funny that I kind of miss it in this case.
8 comments
[ 0.22 ms ] story [ 27.9 ms ] thread