Last active
April 3, 2025 14:04
-
-
Save louisguitton/1f97640d7398fa9e251a679c1360e8e4 to your computer and use it in GitHub Desktop.
New Machine Setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (forked and adapted from Gitlab's https://gitlab.com/gitlab-data/analytics/blob/master/admin/onboarding_script.sh) | |
## install homebrew | |
echo "Installing Homebrew.." | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
echo "Homebrew successfully installed" | |
## install brew cask | |
echo "Installing brew cask.." | |
brew tap homebrew/cask | |
echo "Homebrew cask successfully installed" | |
## install google chrome | |
brew install --cask google-chrome docker visual-studio-code iterm2 | |
## install git | |
echo "Installing git.." | |
brew install git | |
echo "git successfully installed" | |
## install git completion | |
echo "Installing git completion.." | |
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash > ~/.git-completion.bash | |
echo "git completion successfully installed" | |
## install iterm2 | |
echo "Installing iTerm2.." | |
cd ~/Downloads | |
curl https://iterm2.com/downloads/stable/iTerm2-3_1_7.zip > iTerm2.zip | |
unzip iTerm2.zip &> /dev/null | |
mv iTerm.app/ /Applications/iTerm.app | |
spctl --add /Applications/iTerm.app | |
rm -rf iTerm2.zip | |
echo "iTerm2 successfully installed.. Adding colors.." | |
cd ~/Downloads | |
mkdir -p ${HOME}/iterm2-colors | |
cd ${HOME}/iterm2-colors | |
curl https://github.com/mbadolato/iTerm2-Color-Schemes/zipball/master > iterm2-colors.zip | |
unzip iterm2-colors.zip | |
rm iterm2-colors.zip | |
echo "iTerm2 + Colors installed" | |
## zsh | |
brew install zsh zsh-completions zsh-syntax-highlighting &&\ | |
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh &&\ | |
chsh -s /bin/zsh | |
## Copying bash_rc | |
cat <<'EOF' >> ~/.zshrc | |
export EDITOR="code" | |
plugins=(aws docker git kubectl python zsh-autosuggestions zsh-completions colored-man-pages colorize brew macos) | |
if [ -f ~/.path ]; then | |
. ~/.path | |
fi | |
if [ -f ~/.bash_aliases ]; then | |
. ~/.bash_aliases | |
fi | |
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh | |
fpath=(/usr/local/share/zsh-completions $fpath) | |
EOF | |
cat <<'EOF' >> ~/.bash_aliases | |
alias open_dbt_docs='dbt docs generate && dbt docs serve' | |
alias gl_open="git remote -v | awk '/fetch/{print $2}' | sed -Ee 's#(git@|git://)#http://#' -e 's@com:@com/@' | head -n1 | xargs open" | |
alias ls='ls -G' | |
alias grep='grep --color=auto' | |
alias glog='git la' | |
alias cat='bat' | |
EOF | |
cat <<'EOF' >> ~/.gitconfig | |
[alias] | |
l = log --decorate --oneline --graph # like glog | |
la = !sh -c 'PAGER=cat git l -10 $*' -- | |
#fancy log | |
lg = log --graph --full-history --all --color --date=short --pretty=format:\"%x1b[33m%h%x09%x1b[35m%ad%x1b[32m %d%x1b[0m%x20%s\" | |
br = !sh -c 'PAGER=cat git branch --sort=-committerdate $*' -- | |
EOF | |
## terminal awesomeness | |
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions | |
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions | |
brew install tree | |
brew install htop | |
brew cask install ngrok | |
curl https://raw.githubusercontent.com/oskarkrawczyk/honukai-iterm/master/honukai.zsh-theme > ~/.oh-my-zsh/custom/themes/honukai.zsh-theme | |
git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k | |
brew install jq | |
brew install node | |
npm install -g tldr | |
brew install bat | |
brew install tig | |
brew install exa | |
## install vscode | |
echo "Installing VSCode.." | |
brew cask install visual-studio-code | |
## this might ask you for your password | |
code --version | |
echo "VSCode successfully installed" | |
code --install-extension code-settings-sync | |
## useful VSCode extensions that I sync with code-settings-sync | |
## code --install-extension vscode-icons-team.vscode-icons | |
## code --install-extension visualstudioexptteam.vscodeintellicode | |
## code --install-extension davidanson.vscode-markdownlint | |
## code --install-extension eamodio.gitlens | |
## install bash completion | |
echo "Installing bash competion.." | |
brew install bash-completion | |
echo "bash completion successfully installed" | |
## update terminal prompt | |
echo "Updating terminal prompt.." | |
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh >> ~/.git-prompt.sh | |
echo "Terminal prompt successfully updated" | |
## create global gitignore | |
echo "Creating a global gitignore.." | |
git config --global core.excludesfile ~/.gitignore | |
touch ~/.gitignore | |
curl https://www.gitignore.io/api/macos,visualstudiocode >> ~/.gitignore | |
echo "Global gitignore created" | |
## SSH Key setup | |
ssh-keygen -t rsa -b 4096 -C "[email protected]" -q -N "" -f ~/.ssh/id_rsa &&\ | |
eval "$(ssh-agent -s)" &&\ | |
ssh-add ~/.ssh/id_rsa | |
cat ~/.ssh/id_rsa.pub | pbcopy &&\ | |
open https://github.com/settings/ssh/new | |
## configure git | |
brew install git-lfs &&\ | |
git config --global user.name "Louis Guitton" &&\ | |
git config --global user.email "[email protected]" &&\ | |
git config --global push.default matching &&\ | |
git config --global core.editor nano | |
## install the repo | |
echo "Installing a repo.." | |
mkdir ~/workspace/ | |
cd ~/workspace/ | |
git clone [email protected]:louisguitton/awesome-tutos.git | |
echo "Repo successfully installed" | |
## install python3 | |
brew install python3 | |
## install python libraries at system level | |
pip3 install awscli pgcli pylama yapf | |
## install docker | |
brew cask install docker | |
## install kubectl | |
brew install kubectl | |
## install terraform | |
brew install terraform | |
## install heroku CLI | |
brew tap heroku/brew && brew install heroku | |
## install spotify | |
brew cask install spotify | |
## install dbt | |
echo "Installing dbt.." | |
brew update | |
brew tap fishtown-analytics/dbt | |
brew install dbt | |
echo "dbt successfully installed.. Printing version.." | |
dbt --version | |
echo "Seting up dbt profile.." | |
mkdir ~/.dbt | |
touch ~/.dbt/profiles.yml | |
curl https://gitlab.com/gitlab-data/analytics/raw/master/admin/sample_profiles.yml >> ~/.dbt/profiles.yml | |
echo "dbt profile created.. You will need to edit this file later." | |
## you will need to edit this file | |
## install the dbt completion script | |
echo "Installing dbt completion script.." | |
curl https://raw.githubusercontent.com/fishtown-analytics/dbt-completion.bash/master/dbt-completion.bash > ~/.dbt-completion.bash | |
echo 'autoload -U +X compinit && compinit' >> ~/.zshrc | |
echo 'autoload -U +X bashcompinit && bashcompinit' >> ~/.zshrc | |
echo 'source ~/.dbt-completion.bash' >> ~/.zshrc | |
echo "dbt completion script successfully installed" | |
## install SQL clients | |
brew cask install postico | |
brew cask install sequel-pro | |
## install spark | |
brew cask install java | |
brew cask install homebrew/cask-versions/adoptopenjdk8 | |
brew install apache-spark | |
pip3 install pyspark jupyter | |
cat <<'EOF' >> ~/.zshrc | |
export SPARK_HOME=/usr/local/Cellar/apache-spark/2.4.3/libexec | |
export PATH=$SPARK_HOME/bin:$PATH | |
export PYSPARK_DRIVER_PYTHON=jupyter | |
export PYSPARK_DRIVER_PYTHON_OPTS=console | |
EOF | |
## Jumpcloud AWS | |
brew tap versent/homebrew-taps | |
brew install saml2aws | |
## MacOs defaults, inspired by https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
# Finder show hidden files | |
defaults write com.apple.finder AppleShowAllFiles YES && killall Finder | |
# Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons | |
defaults write com.apple.finder QuitMenuItem -bool true | |
# Finder: show all filename extensions | |
defaults write NSGlobalDomain AppleShowAllExtensions -bool true | |
# Display full POSIX path as Finder window title | |
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true | |
# Keep folders on top when sorting by name | |
defaults write com.apple.finder _FXSortFoldersFirst -bool true | |
# Disable smart quotes as they’re annoying when typing code | |
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir workspace | |
xcode-select --install | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"brew doctor | |
brew update | |
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >>/Users/louisguitton/.zprofile | |
code ~/.zshrc | |
mkdir -p ~/.oh-my-zsh/custom/themes/ | |
curl https://raw.githubusercontent.com/oskarkrawczyk/honukai-iterm/master/honukai.zsh-theme >~/.oh-my-zsh/custom/themes/honukai.zsh-theme | |
chmod go-w '/opt/homebrew/share' | |
chmod -R go-w '/opt/homebrew/share/zsh' | |
brew tap homebrew/cask-fonts && brew install --cask font-source-code-pro | |
brew install git | |
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash >~/.git-completion.bash | |
brew install zsh zsh-completions zsh-syntax-highlighting fzf | |
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh | |
chsh -s /bin/zsh | |
brew install bash-completion | |
brew install docker-completion pip-completion | |
brew install zsh-autosuggestions | |
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting | |
git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions | |
code ~/.bash_aliases | |
code ~/.gitconfig | |
code ~/.gitignore | |
ssh-keygen -t rsa -C "[email protected]" | |
eval "$(ssh-agent -s)" | |
ssh-add -K ~/.ssh/id_rsa_procureai | |
pbcopy <~/.ssh/id_rsa_procureai.pub | |
gpg --list-secret-keys --keyid-format=long | |
git config --global gpg.format ssh | |
git config --global user.signingkey ~/.ssh/id_rsa_procureai.pub | |
brew install tree htop jq tig | |
brew install --cask ngrok | |
npm install -g tldr | |
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh >>~/.git-prompt.sh | |
brew install git-lfs | |
git lfs install | |
git lfs install --system | |
brew install python | |
brew install pyenv | |
pyenv install 3.12.7 | |
pyenv global 3.12.7 | |
brew install node | |
brew install volta | |
volta install node | |
brew install openjdk | |
sudo ln -sfn /opt/homebrew/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk | |
brew install gh kubectl supabase/tap/supabase hub kube-ps1 helm awscli | |
gh auth login | |
brew install --cask dbeaver-community lens | |
brew install apache-spark | |
brew install --cask spotify | |
brew install llama.cpp | |
brew install llvm gcc make cmake ccache | |
brew install ollama | |
ollama run llama3.2 | |
docker pull pgvector/pgvector | |
defaults write com.apple.dock workspaces-auto-swoosh -bool NO | |
killall Dock | |
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false | |
mkdir ~/Pictures/screenshots | |
defaults write com.apple.screencapture location ~/Pictures/screenshots && killall SystemUIServer | |
defaults write com.apple.finder AppleShowAllFiles YES && killall Finder | |
defaults write com.apple.finder QuitMenuItem -bool true | |
defaults write NSGlobalDomain AppleShowAllExtensions -bool true | |
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true | |
defaults write com.apple.finder _FXSortFoldersFirst -bool true | |
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fyi - https://gist.github.com/johndpope/1f8a0f119f94ee1d3f3c98753c744d9a
checkout miniconda for python 2/3 environments (as opposed to virtual environments).
checkout rvm for ruby environment managemnt
nvm for node version manager