Short links, made easy

Actually got ahead on the spend time automating curve.

I recently realised that spinning up silly static sites will require subdomains.

This is not a huge amount of effort. Usually login to cloudflare, do 2fa, go to short domain, go to dns page, add A record, switch back to replit to get IP, paste that in cloudflare, switch back to get TXT value...
Made a small script to do that with cloudflare API.
Initial version is python script that asks for subdomain, IP address, and TXT value, then creates the two records. Can save a click by having it parse a blob of text, and get the values out of there itself.

For short links, I am using short.io for psi.mn links (sidenote: is this a bad idea? It's on root of the domain), and learned they have a browser extension and android app. Trying the extension as it required no permissions and seems to work pretty well. Has already saved some minutes! Again the login, go through ui way of a thing. First short link was a site template: psi.mn/replit/static. Also trying grouping subdomains, we will see what I end up thinking of that.

Both have been worth the time.