Setup Terminal with Oh My Zsh and Powerlevel10k

Intalling Oh My Zsh

1
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Download and Install Nerd Patched Fonts

Download and install FuraMono Fonts

Installing Powerlevel10k

1
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k

Change .zshrc Configuration

1
vi .zshrc

Change ZSH_THEME to ZSH_THEME="powerlevel10k/powerlevel10k"

Enable auto correction uncomment line ENABLE_CORRECTION="true"

Then restart your terminal and you will see configuration wizard powerlevel10k

If you see [WARNING]: Console output during zsh initialization detected. change your .p10k.zsh and change this line typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet

If you see [oh-my-zsh] Insecure completion-dependent directories detected: type command below

1
2
chmod 755 /usr/local/share/zsh
chmod 755 /usr/local/share/zsh/site-functions

Add Plugin Auto Suggestions and Syntax Highlighting

Download plugins for auto suggestion and syntax highlighting

1
2
3
git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting

Scroll down on .zshrc find plugin=(git) and change to plugins=(git zsh-autosuggestions zsh-syntax-highlighting)

Configure Multiple JDK with Jenv

Install Jenv

Install jenv with brew

1
2
3
brew install jenv
echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(jenv init -)"' >> ~/.zshrc

Install JDK

Add brew cask by adding homebrew/cask

1
brew tap homebrew/cask-versions

Install JDK 11 and JDK 8 from Azul OpenJDK

Add java11 and java8 into jenv

1
2
jenv add /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/ 
jenv add /Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/ 

See all installed versions java

1
jenv versions

Configure global version

1
jenv global 11.0.9

Configure Multiple Python Version with Pyenv

Install pyenv

Install pyenv with brew

1
brew install pyenv

Define environment variable PYENV_ROOT and add pyenv init

I will use zsh so here bash command line

1
2
3
4
5
6
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc

echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.zshrc

source .zshrc

Install Python

Configure global environment python

1
2
pyenv install 3.9.1
pyenv global 3.9.1

Configure docker and database with docker

*Installing Docker

Download Docker from docker hub

Install MySQL database on docker

1
docker run -p 3306:3306 --name mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:latest

Install SQL Server on docker

1
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=<[email protected]>" -p 1433:1433 --name sqlserver -h sqlserver -d mcr.microsoft.com/mssql/server:2019-latest

Install Postgresql on docker

1
docker run --name postgresql -d -p 5432:5432 -e POSTGRES_PASSWORD=yoursecretpassword postgres

Configuring Auto Connect SSH Tunneling

You can read this step on Auto Start SSH Tunneling on Mac

Configuring RabbitMQ and RabbitMQ Management

Install RabbitMQ with brew

1
brew install rabbitmq

Export path for RabbitMQ

1
export PATH=$PATH:/usr/local/sbin

Start service when laptop is started automatically in backgroun

1
brew services start rabbitmq

Enable management plugin

1
rabbitmq-plugins enable rabbitmq_management

Try to access http://localhost:15672

Install Composer

1
brew install composer

Install Node.js and Yarn

Go to Node.js Org download and install it.

1
2
sudo chown -R $USER /usr/local/lib/node_modules
npm install --global yarn

Install Hugo Blog

1
brew install hugo

Install Maven

1
brew install maven

References