curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
export NVM_DIR=" $HOME /.nvm"
# This loads nvm
[ -s " $NVM_DIR /nvm.sh" ] && \. " $NVM_DIR /nvm.sh"
# This loads nvm bash_completion
[ -s " $NVM_DIR /bash_completion" ] && \. " $NVM_DIR /bash_completion"
sudo apt-get install gnupg
wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -
echo " deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list
Reload local package database
sudo apt-get install -y mongodb-org
Start MongoDB and enable it to start at reboot
systemctl start mongod
systemctl enable mongod
Check whether MongoDB is running correctly
git config --global user.name " John Doe"
git config --global user.email johndoe@example.com
VSCode, git, mongo aliases, Custom prompt in bash
DEFAULT=$PS1
if test -d " dev"
then
cd dev
fi
emojis=(" πΎ" " π" " π²" " π" " π" " π΅" )
EMOJI=${emojis[$RANDOM % ${#emojis[@]} ]}
txtgrn=' \[\e[0;32m\]' # Green
txtgrey=' \[\e[0;37m\]' # Light Grey
bldred=' \[\e[1;31m\]' # Bold Red
bldgrn=' \[\e[1;92m\]' # Bold Green
bldpur=' \[\e[1;35m\]' # Bold Purple
blddef=' \[\e[1;39m\]' # Bold Default
txtrst=' \[\e[0;39m\]' # Text Reset
PS1=" [\d \t] $bldred \u$txtgrey in $bldgrn \w\n$txtrst $EMOJI $ "
# VS code aliases
alias code=code-oss
alias c=' code .'
# GIT aliases
alias gi=' git init'
alias gss=' git status'
alias ga=' git add'
alias gaa=' git add .'
alias gc=' git commit'
alias gcm=' git commit -m'
alias gp=' git push -u origin'
alias gpm=' git push -u origin master'
alias grao=' git remote add origin'
# MONGODB aliases
alias mdp=' mongod --dbpath'
alias mcf=' sudo mongod -f /etc/mongod.conf'