Skip to main content

[cheatSheet] Coding

FrontEnd

NPM

package.json version

  • tilde(~) => update to patch update
    • ~1.2.3 will use releases from 1.2.3 to <1.3.0
  • caret(^) => update to all future minor/patch updates
    • ^2.3.4 will use releases from 2.3.4 to <3.0.0

OTHERS

check which operating system you are currently using

//in  command line
uname; // unix or Linux
systeminfo; //windows

git macOS update

    brew upgrade git //using homebrew

// if git's version is still outdated, try this
brew link --overwrite git // remove sym link
git version // check version again

common Linux command

Resources: https://www.hostinger.com/tutorials/linux-commands

pwd // print current working directory



cd .. // go back to parent directory
cd ~

ls // list all files in current directory

cat fileName // print file content

mkdir directory_name // create directory