Bash/Shell

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

Perl: Generate Random Value

Using perl -e Using debugger as REPL with perl -de x (x can be anything) See: https://perldoc.perl.org/perlfaq3#How-can-I-use-Perl-interactively? Also see http://www.perlmeme.org/howtos/perlfunc/rand_function.html

Perl Programming Language: Intro

Perl Intro Basic syntax overview Perl variable types Variable scoping Conditional and looping constructs Builtin operators and functions Files and I/O Regular expressions Writing subroutines OO Perl and Using Perl modules

Bash Manual

$ man -P cat bash NAME bash – GNU Bourne-Again SHell SYNOPSIS bash [options] [command_string | file] COPYRIGHT Bash is Copyright (C) 1989-2018 by the Free Software Foundation, Inc. DESCRIPTION Bash is an sh-compatible command language interpreter that executes commands read from the standard input or from a file. Bash also incorporates useful features from …

Bash Manual Read More »