Shell Script

Random Strings and Password Generator

Python 3: secrets module string module secrets module See: https://docs.python.org/3/library/secrets.html Random Strings for Bash For macOS, add env LC_ALL=C to avoid error: tr: Illegal byte sequence Example Strong Password with tr and /dev/urandom For macOS, add env LC_ALL=C to avoid error: tr: Illegal byte sequence Also see: https://gist.github.com/earthgecko/3089509

WordPress Backup Scripts

backup-wordpress-dir.sh Assume wordpress directory set up in /var/www/<domain>/wordpress format backup-wordpress-site.sh Assume wordpress directory is under /home/$USER/<domain> for shared hosting like DreamHost. backup-database.sh restore-database.sh