Skip to content

Handy terminal commands

  • 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
  • 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

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

  • Show all docker images:docker ps -a
  • Start image: docker start filename

JS

  • Create a new js package: yarn init
  • Yarn commands: Yarn commands
  • Yarn why: due to which project/package is a package installed

Published inToolsUncategorized

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *