Skip to content

Instantly share code, notes, and snippets.

@jorgegonzalez
Last active January 26, 2020 19:17
Show Gist options
  • Select an option

  • Save jorgegonzalez/fa275fe4f057f46d2dac458f01cf90fa to your computer and use it in GitHub Desktop.

Select an option

Save jorgegonzalez/fa275fe4f057f46d2dac458f01cf90fa to your computer and use it in GitHub Desktop.
Setup script for a fresh Mac
#/usr/bin/bash
# Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Node and friends
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
brew install zsh git neovim neofetch tmux tree bash rbenv
# pnpm
curl -L https://unpkg.com/@pnpm/self-installer | node
# Fonts
brew tap caskroom/fonts
brew cask install font-fira-code
# Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup component add rustfmt
rustup component add clippy
# Oh My Zsh, Spaceship Prompt, Zsh Syntax Highlighting, and Zsh Autosuggestions
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt"
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"
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:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# .tmux
cd
git clone https://github.com/gpakosz/.tmux.git
ln -s -f .tmux/.tmux.conf
cp .tmux/.tmux.conf.local .
# SSH
# https://help.github.com/en/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
ssh-keygen -t rsa -b 4096 -C "email@example.com"
eval "$(ssh-agent -s)"
nvim ~/.ssh/config
ssh-add -K ~/.ssh/id_rsa
pbcopy < ~/.ssh/id_rsa.pub
# GPG
# https://help.github.com/en/articles/checking-for-existing-gpg-keys
gpg --import key.gpg
gpg --list-secret-keys --keyid-format LONG
gpg --armor --export <key>
gpg --armor --export-secret-keys <key>
# git
git config --global user.name "Jorge Gonzalez"
git config --global user.email "jorgegonzalez@users.noreply.github.com"
git config --global user.signingkey <key>
git config --global commit.gpgsign true
touch .hushlogin
# Opam and Ocaml
sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)
opam init
eval `opam env`
# install given version of the compiler
opam switch create 4.09.0
eval `opam env`
# check you got what you want
which ocaml
ocaml -version
opam install merlin
opam user-setup install
# Ruby and rbenv
eval "$(rbenv init -)"
rbenv install 2.7.0
rbenv rehash
rbenv global 2.7.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment