Hacker News new | ask | show | jobs
What's your favorite short, stand-alone program that is fun or useful?
2 points by arturo40 1588 days ago
When I say "stand alone" I mean not just a few lines of script in a complex software ecosystem. Calls to standard libraries are OK.
2 comments

Working with Kubernetes in our environment, I work with a lot of different K8S clusters. As such, I'm constantly needing to switch contexts, or double check what my current context is (pretty important, don't want to run kubectl commands on the wrong cluster!). As such, I wrote a short program and installed it as a kubectl plugin, which lets me run a command like this:

kubectl context

and get a menu with a list of all the contexts currently stored in my kubeconfig, an indication of which one is selected, and the ability to select a new one by entering a single digit numeric ID.

It's a fairly trivial thing, but it's been disproportionately useful to me.

A couple very short programs I find useful are 1. a password generator 2. a math quiz program

https://github.com/majestical2022/useful-and-pleasant