Show HN: Stateless TikToken and Unix-Dictionary GitHub URL Shortener
1 points
2 hours ago
| 0 comments
| selfdotsend.com
| HN
I constantly share raw GitHub install scripts, but I didn’t want another backend URL shortener. Shorty is a single HTML page that normalizes raw.githubusercontent.com or github.com/blob URLs, tokenizes the path with jsTiktoken, and remaps tokens through the Unix words list plus a couple of glyph sets to keep the shortcode tiny. No storage, no API keys—just a deterministic mapping you can host from GitHub Pages.

    What’s different:
    - Canonicalizes github.com/blob links into their raw equivalent automatically.
    - Uses TikToken + Unix dictionary matches to compress owners/repos/paths, with Unicode or box-drawing glyph sets (hash vs. query) for legibility trade-offs.
    - Everything is client-side: paste a URL to get both the shortcode and ready-to-share link; paste a shortcode (hash or query) and it auto-decodes with a 3‑2‑1 redirect
  animation.
    - Ships with a tiny `embed-shorty.js` so you can drop the decoder onto any page.

    Try it at the link above or grab the code: https://github.com/metacritical/shorty
No one has commented on this post.