Skip to content

Instantly share code, notes, and snippets.

@mehmt948
mehmt948 / install-nodejs-nvm.sh
Created May 1, 2023 13:46
Install Node.js using nvm
#!/bin/bash
# Download and run the NVM installation script
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
# Reload the shell configuration to make the nvm command available
source ~/.bashrc
# Print instructions for listing versions of Node.js
echo "list versions -> 'nvm list-remote'"
@mehmt948
mehmt948 / basic-useful-bash-aliases.sh
Created December 2, 2023 15:48
basic useful bash aliases for developers
alias gs="git status"; # git status. example usage: gs
alias gc="git checkout"; # checkout a branch. example usage: gc sample-branch
alias gcb="git checkout -b"; # creates a new branch. example usage: gcb sample-branch
alias gpso="git push origin"; # push branch to origin remote. example usage: gpso sample-branch
alias gplo="git pull origin"; # pull branch from origin remote. example usage: gplo sample-branch
alias gcplo="git checkout $1 && git pull origin $1"; # checkout and pull branch from origin remote. example usage: gcplo sample-branch