- Allow website through vpn or link IP to a dns name:
sudo pico /etc/hosts (add ip address and public name)
- List hidden files: ls -a
- Show environment variables: printenv
- Important file: ~/.zsrhc
- Add path variable:export PATH=$PATH:pathname
- Is virtualisation enabled on computer (VMX in return value means yes): sysctl -a | grep -o VMX
- Treat insecure origin as secureopen -a /Applications/Google\ Chrome.app’ –args –unsafely-treat-insecure-origin-as-secure=”http://localhost:3000″‘
- Treat insecure origin as secure in Chrome browser urlchrome://flags/#unsafely-treat-insecure-origin-as-secure
- Remove node modules:
find . | grep /node_modules$ | grep -v /node_modules/ | xargs rm -fR
GIT
-
- Show adapted files: git diff –cached –name-only
- Show adapted file: git diff master package.json
- Revert a commit:
git show HEAD > patch git revert HEAD git apply patch
Undo a commit to unstaged changes:
git reset HEAD~
- To rebase:
Git rebase -I HEAD~4 > 4 commits rebasen Git rebase – I commitnr Vim > I > change pick by s > esc >wq
- to make case sensitive files be checked in: git config core.ignorecase false
DOCKER
- UI: Dockstation , Kitematic, Docker Desktop
- Show all docker images:docker ps -a
- Start image: docker start filename
- Run command inside docker image: Docker exec -I focus-up_filingcoresync-service_1 npm run resetSync
JS
- Create a new js package: yarn init
- Yarn commands: Yarn commands
- Yarn why: due to which project/package is a package installed. When having duplicate packages, check yarn.lock to see where the duplicate comes from and add it to resolutions in package.json (only works in the top level in case of a workspace) or upgrade.
- Yarn upgrade: does not update package.json. use yarn upgrade package@^
- Yarn outdated: check which packages are outdated
Be First to Comment