- Serve your sites locally when doing simple local web development to bypass CORS issues and such. Run this in the base directory of whatever you're working on (instead of opening index.html):
python -m SimpleHTTPServer 8080
- Clean install your Node modules:
rm -rf node_modules; npm i
- I use Cmder as my Windows terminal.
- Spectacle (on Macs) is a must.
- See your installed VSCode extensions with
code --list-extensions | xargs -L 1 echo
. I use all of these. - Use tput and variables to make shell script output cooler
- Use
console.table({someObject})
instead of logs. - Five layer networking model example
- Profile and optimize your regex.
- Change your email per Git repo:
git config user.email "whatever@cool.com"
- Rollback commits:
git reset HEAD~{number to rollback}
git clean -dfX
will remove untracked directories and files (forcefully) from the working tree that are ignored by Git.- See git blame line numbers per author per repo. Run:
git ls-tree -r -z --name-only HEAD | xargs -0 -n1 git blame --line-porcelain HEAD |grep "^author "|sort|uniq -c|sort -nr
(it can be slow) - Add GitHub actions badges to a Readme (the workflow name is in the .yml, i.e. "Go", "Android", etc):
![](https://github.com/{owner}/{repo}/workflows/{workflow_name}/badge.svg?branch={targeted_branch})
- I use zsh-completions so that I have tab completions specifically for Git branches and npm run scripts.
- .zshrc for showing current Git branch, e.g.:
curl https://gist.githubusercontent.com/willfolsom/43d26018be685c651968431124a79906/raw/3f6bc3976448134f14e6cca2d68a71b85eb32b0a/.zshrc -so .zshrc