Today has not been my most focused day. Luckily for you all!
It all started well, I was in the middle of a technical planning discussion and wanted to put my opinion forward. When suddenly I realized: I was about to make a strong statement about some software I had never actually used.
In technical circles this is known as “being a jerk”.
So, I bit my tongue and decided to go try it out. However, trying out this software meant setting up multiple systems and following a relatively complicated process. After an hour of slogging through this – I decided it was time to start automating the process. ‘cause coding is fun.
After a bit of coding – I found that I needed to name a bunch of virtual machines.
Now – if you have ever used Docker you know that you do not need to name containers. It does it for you:
What you probably don’t know is that this name generation is based on an open source project – “pet name”. Which was made by Dustin Kirkland. He has created versions of this utility for:
- Linux (https://github.com/dustinkirkland/petname)
- Go (https://github.com/dustinkirkland/golang-petname)
- Python (https://pypi.org/project/petname/, https://pypi.org/project/petname/)
However, I am using PowerShell.
Now, I did consider using one of these projects and piping the results through the Windows Subsytem for Linux – but I ended up deciding that it would be more useful to just write a PowerShell version of the pet name generator (after searching GitHub to make sure that no one had already done it – of course!). And a couple of hours later – here we are and I can present:
You can read more about the project at the GitHub page – but you can use this to easily generate names for anything when you are scripting from PowerShell.