Update and upgrade
sudo apt update
sudo apt -y upgrade
sudo apt install -y vimInstall git
sudo apt install -y gitCreate SSH key:
ssh-keygen
# Hit enter for all the prompts
cat ~/.ssh/id_rsa.pubUpload the ssh key to github
Setup your git credentials
git config --global user.name "<Your Name>"
git config --global user.email <Your Email>Enable git to push current branch
git config --global push.default currentSetup vim as the git editor
git config --global core.editor "vim"Install meld
sudo apt install -y meldAdd the following to your ~/.gitconfig file.
[diff]
tool = meld
[difftool]
prompt = false
[difftool "meld"]
cmd = meld "$LOCAL" "$REMOTE"
Install zsh and powerline fonts
sudo apt install -y zsh powerline fonts-powerline
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
vim .zshrc
# Find the line ZSH_THEME="robbyrussell" replace robbyrussell with "agnoster" theme in .zshrc
# ZSH_THEME="agnoster"
# Change the default shell
chsh -s /bin/zsh
# Enable syntax highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "$HOME/.zsh-syntax-highlighting" --depth 1
echo "source $HOME/.zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> "$HOME/.zshrc"Reboot the machine to see the new shell in action.
Install Docker: Ref: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
apt-cache policy docker-ce
sudo apt install -y docker-ce
# Check if docker is running
sudo systemctl status docker
# Executing the Docker Command Without Sudo
sudo usermod -aG docker ${USER}
su - ${USER}
# Confirm that the user is added to docker group
id -nGInstall docker-compose. Ref: https://www.digitalocean.com/community/tutorials/how-to-install-docker-compose-on-ubuntu-18-04
sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
# Confirm that docker-compose is installed
docker-compose --versionReboot the machine before starting to use docker-compose
Note: These are my personal preferences.
vim ~/.bv_bashrcAdd the following lines to the file:
# Git Aliases
alias gs='git status'
alias gd='git difftool'
alias gdc='gd --cached'
# Docker Aliases
alias dc='docker-compose'
alias dcb='dc build'
alias dcu='dc up'
alias dce='dc exec'
alias dcr='dc run'
# Miscellaneous
# alias chapp='sudo chmod -R 777 app/**/* db/**/* spec/**/*'
alias chapp='sudo chown -R $USER:$USER .'Add the following towards the end of ~/.zshrc:
source ~/.bv_bashrcLet us assume that your email id is 'me@me.com' and you would like to have all the commits signed-off by 'cop@cop.cop'.
Set up the sign-off person as the default author, at the project level:
# cd to the project directory
git config user.name "<Sign-off Person Name>"
git config user.email <Sign-off Person Email>Setup an alias for easy sign-off. Add the following to your aliases file.
alias gcbv='git commit --signoff --author="Your Name <your@email>"'
alias gca='git commit --amend --signoff --author="Your Name <your@email>"'sudo apt install -y software-properties-common
sudo apt-add-repository --yes --update ppa:ansible/ansible
sudo apt install -y ansibleAdd the following to ~/.ssh/config:
Host *
ServerAliveInterval 30
ServerAliveCountMax 5Ref: Integrating Prettier + ESLint + Airbnb Style Guide in VSCode
Add the following line to the end of the file /etc/sysctl.conf:
fs.inotify.max_user_watches=524288Then run:
sudo sysctl -pNote: This is tested for GTX1650. Youmight need a different version of driver for your graphics card.
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt updateNow, lnch Software & Updates utility, and navigate to Additional Drivers tab. hen choose using “NVIDIA driver metapackage from nvidia-driver-430” from the list and click Apply Changes.