gene

Go Tooling

Notes based on: Go Tooling in Action – YouTube go build go install go get go get -d: download the code, but do not compile anything. go get -u: even if the code is already stored in GOPATH, download the latest version. go get -v: enable verbose mode. See: github.com/campoy/go-tooling-workshop/blob/master/1-source-code/1-workspace/1-intro.md The Go tool will first try …

Go Tooling Read More »

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

Git Cheat Sheet & Visual

git diff –  changes in working directory. git diff –cached – changes in staging area. git diff HEAD – changes in working directory and staging area. Also See https://git-scm.com/docs/git-log https://education.github.com/git-cheat-sheet-education.pdf https://www.atlassian.com/git/tutorials/atlassian-git-cheatsheet