- ↓ downwards arrow (U+2193)
- ← leftwards arrow (U+2190)
- ⌥ option key (U+2325)
- ⌘ place of interest sign (U+2318)
- → rightwards arrow (U+2192)
- ↑ upwards arrow (U+2191)
- ⇧ upwards white arrow (U+21E7)
- § section sign (U+00A7)
- :focus-within - CSS: Cascading Style Sheets | MDN
- align-self - CSS: Cascading Style Sheets | MDN
- appearance - CSS: Cascading Style Sheets | MDN
- Modern Font Stacks
- outline - CSS: Cascading Style Sheets | MDN
- outline-offset - CSS: Cascading Style Sheets | MDN
- prefers-color-scheme - CSS: Cascading Style Sheets | MDN
- prefers-reduced-motion - CSS: Cascading Style Sheets | MDN
- System Font Stack
- white-space-collapse - CSS: Cascading Style Sheets | MDN
- Prune system volumes:
docker system prune --volumes - Delete all images:
docker rmi $(docker images -a -q)
- Auto-setup remote branch with tracking:
git config --global push.autoSetupRemote true. - Amend a commit with a message that starts with an octothorpe:
git commit --amend --cleanup=scissors. - Checkout the last locally used branch:
git checkout -. - Create an empty branch:
git switch --orphan <BRANCH>. - Create an empty commit:
git commit --allow-empty --message='<MESSAGE>'. - Delete a local tag:
git tag --delete <TAG>. - Delete a remote branch:
git push --delete <REMOTE> <BRANCH>. - Delete a remote tag:
git push --delete <REMOTE> <TAG>. - Delete all local branches which have been merged into main:
git branch --no-contains main --merged main | xargs git branch -d - Diff staged files:
git diff --stagedorgit diff --cached. - List all the commit hashes in a branch:
git rev-list <BRANCH>. - List all the local branches in a "very verbose" manner (branches which once had a remote version on origin will have a "gone" tag):
git branch -vv - Move/rename the current local branch:
git branch --move <NEW BRANCH>. - Set default branch name:
git config --global init.defaultBranch <NAME> - Reset all tracked files and delete all untracked files and directories:
git reset --hard && git clean -d --force. - Reset the last commit and unstage the changes:
git reset HEAD~. - Rebase to squash commits interactively, using
<BRANCH>as a starting point:git rebase --interactive <BRANCH>. - Show the working tree status; including files that are ignored:
git status --ignored. - Set a global Git ignore file:
git config --global core.excludesFile '<PATH_TO_GITIGNORE>'
- Create a
Brewfileof your currently installed Homebrew packages. Targets$HOMEby default:brew bundle dump [--file=/path/to/Brewfile] [--force] [--describe] - Install from a
Brewfile. Searches$HOMEby default:brew bundle install [--file=/path/to/Brewfile]
- HTMLElement.inert - Web APIs | MDN
- HTML Standard § 4.10.18.7.1 Autofilling form controls: the autocomplete attribute
- Add or remove carets at selected locations using a mouse: ⌥ Option + Click
- Add selection for next occurance: ^ Control + G
- Duplicate Line: ⌘ Command + D
- Select all occurrences of a word or a text range: ⌘ Command + ^ Control + G
- Select multiple occurrences of a word or a text range: ^ Control + G
- Surround Code: ⌘ Command + ⌥ Option + T
- Move Line Down: ⇧ Shift + ⌥ Option + ↓ Down
- Move Line Up: ⇧ Shift + ⌥ Option + ↑ Up
- View Quick Documentation: ^ Control + J
- View Valid Parameters (in parentheses of a method call): ⌘ Command + P
- Add Selection for Next Occurrence: Alt + J
- Extract Variable Refactoring: Ctrl + Alt + V
- Surround Code: Ctrl + Alt + T
- View Quick Documentation: Ctrl + Q
- View Valid Parameters (in parentheses of a method call): Ctrl + P
- Set default package initialization author email:
npm config set init-author-email <EMAIL>. - Set default package initialization author name:
npm config set init-author-name <NAME>. - Set default package initialization author URL:
npm config set init-author-url <URL>. - Set default package initialization license:
npm config set init-license <SPDX LICENSE>. - Set default package initialization scope:
npm config set scope @<SCOPE NAME>. - Set default package initialization version:
npm config set init-version 0.0.0. - List configuration:
npm config list. - View a package's published version:
npm view <PKG NAME> version. - List a package's distribution tags:
npm dist-tag ls [PKG NAME]. - ...:
npm help package.json
Open file at a specified position: Cmd + P -> $FILENAME:$LINE:$COLUMN
- Determine a file's type:
file $FILE - Determine a file's type (without prepending the filename to the output):
file --brief $FILE - Get current shell PID:
echo $$ - Get current year:
date +"%Y" - Get the ISO 8601 date:
date --iso-8601(not on macOS) ordate +"%Y-%m-%d" - Get Debian version:
cat /etc/debian_version - Get Linux version (and other metadata):
cat /etc/os-release - Get OS type:
uname("Darwin" for macOS and "Linux" for, well... Linux) - Get Ubuntu version:
lsb_release -a - Get most recent exit code:
echo $? - Get shell name:
ps hp $$ -o cmd - List all actively listening TCP ports on localhost:
[sudo] lsof -PiTCP -sTCP:LISTEN - Make a directory and
cdinto it (without re-typing the directory name):mkdir $DIRECTORY_NAME && cd $_ - Rebuild font cache:
fc-cache -fv(Maybe Linux only? Not on macOS 15.5 at least.) - Remove extended attributes (macOS):
xattr -c $FILENAME - Run a command repeatedly a finite amount of times:
for _ in {1..$DESIRED_RUN_COUNT}; do $COMMAND; done - ...:
netstat -ant | grep LISTENequivalent tonetstat -anp tcp | grep LISTEN
- Add column: ⌘ (Command) + \
- Add cursor(s) to line end(s): ⇧ Shift + ⌥ Option + I
- Copy line down: ⇧ (Shift) + ⌥ (Option) + ↓ (Down)
- Copy line up: ⇧ (Shift) + ⌥ (Option) + ↑ (Up)
- Move line down: ⌥ (Option) + ↓ (Down)
- Move line up: ⌥ (Option) + ↑ (Up)
- Set default package initialization author email:
yarn config set init-author-email <EMAIL>. - Set default package initialization author name:
yarn config set init-author-name <NAME>. - Set default package initialization author URL:
yarn config set init-author-url <URL>. - Set default package initialization license:
yarn config set init-license <SPDX LICENSE>. - Set default package initialization version:
yarn config set init-version 0.0.0.