# All geos, all languages
language IN ["in", "en", "gb", "da", "nl", "fi", "fr", "de", "it", "ja", "ko", "no", "pt-br", "ru", "es", "sv", "tr", "zh-tw"]
# Do NOT include Portuguese
language != "pt-br"
# English-only
language IN ["en", "gb"]
git commit --no-verify
make test-php
npm run build:types && npm run lint # typescript build and check lint
npm run lint && npm run test -- -u # run lint tests and update snapshots
npm run eslint-fix # auto-fix lint errors
git pull origin main # pull all latest from main
git reset --hard origin/main # reset entire branch to main removing any local changes
npm install --no-optional --no-audit
npm run clean:cache
npm run build
# update dependencies in package.json to latest
npm i -g npm-check-updates
ncu -u
npm install
sudo nano /etc/paths
sudo npm cache clear --force
git branch --merged | grep -v \* | xargs
git branch --merged | grep -v \* | xargs git branch -D
git branch | grep -v "main" | xargs git branch -D
git commit -e --file=$(git rev-parse --git-dir)/COMMIT_EDITMSG
Try git stash apply
instead of git stash pop
to avoid losing saved changes
git stash save <message>
git stash apply stash@{#}
rm -rf .git*
echo $PATH | tr ":" "\n"
sudo npm cache clean -f
sudo npm install -g n #install latest version of node
sudo n vX.XX.XX #install specifc version of node
sudo n stable
ssh-add -K
You know when you accidentally commit "." files this will take a while but it will walk through every committed instance of the file and directory on your branch and remove it, your will have to force the push to see results on remote. USE WITH EXTREME CAUTION
git filter-branch --tree-filter 'rm -rf <file-or-directory-to-be-removed>' HEAD
Quick version, does not check the tree
git filter-branch --index-filter 'rm -rf <file-or-directory-to-be-removed>' HEAD
Rebase, then replace pick with reword, save/exit, the commit window will open for editing, save and force push
git rebase -i <commit_hash>^ OR git rebase -i HEAD~N // N = number of commits back
reword <commit_hash>
:wq
Remove and reinstall node_modules
rm -rf node_modules
npm install
An incomplete list of skills senior engineers need, beyond coding
Which docker containers are running on the host: docker ps
See all docker containers: docker ps -a
Restart a docker container: docker restart <container-id>
Stop a docker container: docker stop <container-id>
Start a docker container: docker start <container-id>
Shut down VirtualBox, restart, in CLI enter sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
, then vagrant up
If this doesn't work, you will need to go to System Preferences > Security & Privacy Then hit the “Allow” button to let Oracle (VirtualBox) load.
- https://reactjs.org/docs/typechecking-with-proptypes.html
- https://medium.com/@pojotorshemi/react-basis-default-props-and-typechecking-with-proptypes-4ddf02d15992
- https://blog.logrocket.com/validating-react-component-props-with-prop-types-ef14b29963fc/
- Signing Commits on M1 Machine - Anne Fortuin
- Signing Commits on M1 Machine - Nguyễn Hoàng Minh Quân
- GPG Config
# determine if a gpg-agent is running
gpg-agent --default-cache-ttl 2629800
# [Correct Correct GnuPG Permission](https://gist.github.com/oseme-techguy/bae2e309c084d93b75a9b25f49718f85)
#!/usr/bin/env bash
# To fix the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error
# Make sure that the .gnupg directory and its contents is accessibile by your user.
chown -R $(whoami) ~/.gnupg/
# Also correct the permissions and access rights on the directory
chmod 600 ~/.gnupg/*
chmod 700 ~/.gnupg
# ensure the following is in ~/.gnupg/gpg-agent.conf
# remember the password longer (1 hour since last usage, 5 hours max)
default-cache-ttl 3600
max-cache-ttl 18000
allow-preset-passphrase
allow-loopback-pinentry
# ensure the following is in ~/.gnupg/gpg.conf
pinentry-program /usr/local/bin/pinentry-mac
use-agent
pinentry-mode loopback