Basic Programming Workstation Setup



The build-essential meta package



• Contains c, c++ compilers, library & header files, gnu make and other tools

sudo apt update
sudo apt install build-essential


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Get Sublime Text 3



• vims, emacs for advanced users

sudo apt-get install apt-transport-https
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt update
sudo apt install sublime-text
which subl
# /usr/bin/subl


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Multiple cursors and packages in Sublime Text



# Install package control in sublime text
ctrl-shift-p
# type "package"
# select "Install Package Control"


# Install additional package
ctrl-shift-p
# select "Package Control: Install Package"
# syntax higlighting package: "bash"


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Git (software version control)



which git
sudo apt install git-core


cd ~/code/myscript
git init .
git status
git add myscript.py
git commit
git config --global user.email "abc@test.com"
git config --global user.name "John Simith"
git commit      # input comment
git status
# Reset overwrite local file from remote repository
git checkout myscript.py


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The Z Shell (zsh) and oh-my-zsh



• Color syntax when using git
• Github: oh-my-zsh
• Themes: here and external

# Install zsh
sudo apt install zsh

# Install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# logout


# Verify
echo $SHELL
grep $(whoami) /etc/passwd


# Edit config
less ~/.zshrc


# Change theme
subl ~/.zshrc                   # open sublime text
# Inside .zshrc
ZSH_THEME='robbyrussel'         # theme like 'bullet train'

Index