Live data from Hacker News

Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages

github.com

151–160 of 182 posts

Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages

#151

Earlier quoted context omitted.

A URL shortener can be done with no database - I did it using only Lambda functions once, but I wouldn't recommend it. :) https://kevinkuchta.com/2018/03/lambda-only-url-shortener/

I've seen people suggest using pi as a "database." In this instance you could map ranges of pi to characters. Then you search pi until you find the right range. The URL would contain the range(s) needed. This is terrible and so computationally wasteful. But it's interesting to think about.

"X in pi" is an interesting thought experiment, but practically speaking, the least efficient way to do anything, since finding a string of N digits in pi will require a search space exponentially much larger than N on average, so it ends up just being an extremely inefficient encoding. A huffman coding + base32/base64 is a better "databaseless" short URL system.

Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages

#152

I was expecting it to be a way of taking a URL and converting it to a base64 type of format that is stored on the "url" itself and decoded by a simple web page. I have wanted to try to do this for a while, but never saw down to look for an appropriate encoding that somehow also compresses. I helped someone design a regular URL shortener in PHP before, they're not complicated to implement with a simple MySQL (or even…

Base64 would probably be longer than the original URL. I can't really see how short pieces of text (like URLs) could be compressed to become smaller. That being said it's definitely a cool concept! I once worked on a code playground kinda thing for my school and there was a function to share the code written in a URL. How we did it was just to include the whole piece of code as a URL param in base64!

Well that's why I said "type of" but yeah I can't see it either unfortunately, of course, as long as the URL you're trying to shorten isn't too insanely long it might be workable to do some sort of encoding on it.

Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages

#155
post #118

Earlier quoted context omitted.

Just like serverless still has servers, this can be reasonably called dbless :)

Essentially this is the promise of the blockchain. Imagine one massive global database where anyone can store anything in encrypted form. Free, forever.

There is no free lunch. That goes double for proof of work algorithms.

Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages

#156
post #17

Interesting. This could be considered as abuse of github issues though.

Yeah, this is like when people built filesystems on top of Gmail attachments in the bad old days before Dropbox.

Boy I remember doing this when I got my Gmail invite around 2006, those files are still retrievable today!

Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages

#157
post #129

I was always fixated with URL shorteners and always wanted to write one myself. While it would be easy to write one that works with a server, I loved the idea of hosting and running one for free. Thus, I wrote this URL shortener which does not need a backend to work at all. It uses GitHub issues as a "database", and unlike most other URL shorteners that do not need backends, this one doesn't need a # prefixed to the…

"I was always fixated with URL shorteners and always wanted to write one myself. While it would be easy to write one that works with a server, I loved the idea of hosting and running one for free." I felt exactly the same way and did, in fact, build one.[1] It was pretty simple. There's an interesting twist to the particular one I built - it's not specifically a URL shortener, it's a "Universal Shortener".[2] Also no…

What does the "searchable" option mean? I couldn't find anything about it in the faqs.

Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages

#158
post #118

Earlier quoted context omitted.

Just like serverless still has servers, this can be reasonably called dbless :)

Essentially this is the promise of the blockchain. Imagine one massive global database where anyone can store anything in encrypted form. Free, forever.

When something called "proof of work" is so central to an idea, it can't be at the same time, "free".

Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages

#159
post #129

I was always fixated with URL shorteners and always wanted to write one myself. While it would be easy to write one that works with a server, I loved the idea of hosting and running one for free. Thus, I wrote this URL shortener which does not need a backend to work at all. It uses GitHub issues as a "database", and unlike most other URL shorteners that do not need backends, this one doesn't need a # prefixed to the…

"I was always fixated with URL shorteners and always wanted to write one myself. While it would be easy to write one that works with a server, I loved the idea of hosting and running one for free." I felt exactly the same way and did, in fact, build one.[1] It was pretty simple. There's an interesting twist to the particular one I built - it's not specifically a URL shortener, it's a "Universal Shortener".[2] Also no…

Blocked under the phishing category by my corporate proxy, FYI.
Post reply on HN