arlyxiao / best-practice

1 stars 0 forks source link

Commands #15

Open arlyxiao opened 3 years ago

arlyxiao commented 3 years ago

Node

node -v || node --version

// list installed versions of node (via nvm)
nvm ls

// install specific version of node
nvm install 6.9.2

// set default version of node
nvm alias default 6.9.2

// switch version of node
nvm use 6.9.1

Docker

docker system prune

Stop containers

docker stop $(docker ps -a -q)

Remove running containers

docker rm  $(docker ps -q -a)

Remove images

docker rmi -f $(docker images -a -q)

git

Update remote repo on your fork

git remote add upstream  https://github.com/your-repo
git fetch upstream
git merge upstream/develop
arlyxiao commented 3 years ago

browser-sync

browser-sync start --proxy localhost:3000 --files="public/stylesheets/*.css", "public/scripts/*.js" "public/views/*.ejs"  --no-notify
arlyxiao commented 1 year ago

Sort big size folder in linux

sudo du -h /var --max-depth=1 | sort -rh

SSH github

ssh-keygen -t ed25519 -C "your_email@example.com"
arlyxiao commented 9 months ago
windows, git use LF

https://stackoverflow.com/questions/2517190/how-do-i-force-git-to-use-lf-instead-of-crlf-under-windows

git config --global core.eol lf
git config --global core.autocrlf input