Skip to content

Instantly share code, notes, and snippets.

@letoh
Created February 25, 2015 02:33
Show Gist options
  • Save letoh/2d9e10e726427ef81cf2 to your computer and use it in GitHub Desktop.
Save letoh/2d9e10e726427ef81cf2 to your computer and use it in GitHub Desktop.
#!/bin/sh
date | md5sum
date +%s | sha256sum | base64 | head -c 32; echo
< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo;
openssl rand -base64 32
openssl rand -base64 37 | cut -c1-37
tr -cd '[:alnum:]' < /dev/urandom | fold -w30 | head -n1
strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 30 | tr -d '\n'; echo
< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c6
dd if=/dev/urandom bs=1 count=32 2>/dev/null | base64 -w 0 | rev | cut -b 2- | rev
</dev/urandom tr -dc '12345!@#$%qwertQWERTasdfgASDFGzxcvbZXCVB' | head -c8; echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment