Hacker News new | ask | show | jobs
by bunni 3663 days ago
Don't think of this as a url shortener, my use case would be something like pastebin or gist but with free private anonymous pastes. It also took me all of 2 minutes to get a python implementation working with the API. One suggestion, when I look up the codes if I include the 0x eg. "0xDV2HW7" or "0 x DV2HW7" it fails to lookup the code - it wasn't immediately obvious to me to discard the 0x on lookup.
1 comments

Hmmm .... we have it coded to accept either:

http://0x.co/EXAMPLE

or:

http://0x.co/0xEXAMPLE

... so I wonder, how are you doing the lookup that it is failing without the 0x ?

EDIT: OH, ACTUALLY - are you looking up "0 x EXAMPLE", with the spaces in there ? No, that won't work - we just have the spaces in place on the webpage to make it easy on the eyes ... is that what you're doing ?

edit: and for anyone reading, you can do the lookup even simpler with plain old 'nc' - you can specify http:// (non SSL) address if you need to ...

If you decide that spaces aren't valid identifiers in 0x codes, then it might be worthwhile to strip all of them out when someone enters one.
Ok, we now ignore spaces in the code inputs, so it no longer matters if you enter:

  7DBZ3G
  0x7DBZ3G
  0 x 7DBZ3G
... they all work the same way.
I'm typing 0x4PJGX8 into the lookup form at https://0x.co/index.html and it fails, https://0x.co/0x4PJGX8 does indeed route correctly.
Fixed - thank you.