Skip to content

Instantly share code, notes, and snippets.

@smashism
Last active December 10, 2022 15:52
Show Gist options
  • Save smashism/8068e42ecd3d0374707f0bf583d3ea83 to your computer and use it in GitHub Desktop.
Save smashism/8068e42ecd3d0374707f0bf583d3ea83 to your computer and use it in GitHub Desktop.
random_sn
randomsn() {
managed_python3 -c "import string; from random import randint, sample; print('VM' + ''.join(sample((string.ascii_lowercase + string.digits),10)))"
}
@chrismccoy
Copy link

could also do

cat /dev/random | LC_CTYPE=C tr -dc "[:alpha:]" | head -c 10

@smashism
Copy link
Author

smashism commented Feb 1, 2022

roll your own organizational python3
https://github.com/macadmins/python

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment