What's your favorite short, stand-alone program that is fun or useful?

2 points by arturo40 ↗ HN
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

[ 4.7 ms ] story [ 22.3 ms ] thread
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.