Update and upgrade
sudo apt update
sudo apt -y upgrade
sudo apt install -y vim
Install git
sudo apt install -y git
Create SSH key:
ssh-keygen
# Hit enter for all the prompts
cat ~/.ssh/id_rsa.pub
Upload 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 current
Setup vim
as the git editor
git config --global core.editor "vim"
Install meld
sudo apt install -y meld
Add 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 -nG
Install 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 --version
Reboot the machine before starting to use docker-compose
Note: These are my personal preferences.
vim ~/.bv_bashrc
Add 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_bashrc
Let us assume that your email id is '[email protected]' and you would like to have all the commits signed-off by '[email protected]'.
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 ansible
Add the following to ~/.ssh/config
:
Host *
ServerAliveInterval 30
ServerAliveCountMax 5
Ref: 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=524288
Then run:
sudo sysctl -p
Note: 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 update
Now, 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.