Skip to content

Instantly share code, notes, and snippets.

@yuripourre
Last active April 9, 2024 23:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuripourre/3d49e2e99924774d057ad0012159e390 to your computer and use it in GitHub Desktop.
Save yuripourre/3d49e2e99924774d057ad0012159e390 to your computer and use it in GitHub Desktop.
Mac Setup
setopt interactivecomments
# The command above allows you to have bash style comments
# Create .zshrc file
touch ~/.zshrc
# Enable git tab for branch completion
echo 'autoload -Uz compinit && compinit' >> ~/.zshrc
# Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
echo "export PATH=/opt/homebrew/bin:\$PATH" >> ~/.zshrc
# Install MacPorts
xcode-select --install
curl https://github.com/macports/macports-base/releases/download/v2.8.1/MacPorts-2.8.1-13-Ventura.pkg
sudo installer -pkg MacPorts-2.8.1-13-Ventura.pkg -target /
# Setup Requirements
sudo port load dbus
sudo port select --set python3 python311
# Install Gedit
yes | sudo port install gedit
# Installing Meld
yes | sudo port install meld
git config --global merge.tool meld
# Install Git
arch -arm64 brew install git
#git config --global user.name "Yuri Pourre"
#git config --global user.email "yuri@email.com"
# Install NVM
arch -arm64 brew update
arch -arm64 brew install nvm
mkdir ~/.nvm
echo "export NVM_DIR=~/.nvm\nsource \$(brew --prefix nvm)/nvm.sh" >> ~/.zshrc
# Azure command line tools
arch -arm64 brew install azure-cli
# Installing docker runtime (colima)
arch -arm64 brew install colima
colima start
# Create a link so testcontainers works and it works similar to docker
sudo ln -s $HOME/.colima/docker.sock /var/run/docker.sock
# Installing Java OpenJDK 17
arch -arm64 brew install openjdk@17
echo "export JAVA_HOME==`/usr/libexec/java_home -v 17`" >> ~/.zshrc
source ~/.zshrc
@yuripourre
Copy link
Author

yuripourre commented Dec 7, 2022

function parse_git_branch() {
    git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/(\1)/p'
}

COLOR_DEF=$'\e[0m'
COLOR_DIR=$'\e[38;5;197m'
COLOR_GIT=$'\e[38;5;39m'
setopt PROMPT_SUBST
export PROMPT='%n %~ ${COLOR_GIT}$(parse_git_branch)${COLOR_DEF} $ '

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment