Skip to content

Instantly share code, notes, and snippets.

@orlando
Forked from todc/mac-setup.md
Last active January 27, 2024 21:18
Show Gist options
  • Star 58 You must be signed in to star a gist
  • Fork 16 You must be signed in to fork a gist
  • Save orlando/3991bd633b443078176f to your computer and use it in GitHub Desktop.
Save orlando/3991bd633b443078176f to your computer and use it in GitHub Desktop.
Fresh Mac OS Setup

1. Run Software Update

Make sure everything is up to date in the App Store

2. Install Homebrew

  1. Open a terminal window and execute the Homebrew install script:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew tap homebrew/cask-versions
brew tap homebrew/cask-drivers
brew tap homebrew/cask-fonts

3. Install Software via Homebrew

brew install mackup
brew install mas
brew install zsh-completions
brew install starship

brew install --cask 1password
brew install --cask iterm2
brew install --cask figma
brew install --cask keybase
brew install --cask transmit
brew install --cask monitorcontrol

brew install --cask rescuetime
brew install --cask aws-vault
brew install --cask bartender
brew install --cask google-chrome
brew install --cask arc

brew install --cask roam-research
brew install --cask notion

brew install neovim
brew install --cask visual-studio-code
brew install --cask zed

brew install --cask docker
brew install kubectl

brew install --cask slack
brew install --cask franz
brew install --cask discord
brew install --cask zoomus

brew install --cask ngrok
brew install --cask charles

brew install readline
brew install rbenv
brew install rbenv-gemset
brew install nodenv
brew install pyenv
brew install yarn
brew install golang
brew tap oven-sh/bun && brew install bun

brew install coreutils
brew install gnu-tar --with-default-names
brew install ondir
brew install mkcert
brew install nss
brew install nektos/tap/act
brew install gnu-sed

brew install heroku/brew/heroku
brew install getsentry/tools/sentry-cli
brew install awscli
brew install github/gh/gh
brew install doctl

brew install optipng
brew install jpegoptim
brew install gifsicle
brew install svgo
brew install jhead
brew install librsvg
brew install pngquant

brew install fzf
brew install yamllint
brew install gpg
brew install watchman
brew install graphviz
brew install htop
brew install jq
brew install ghostscript
brew install imagemagick
brew install cmake
brew install wget

brew install postgresql
brew install redis
brew install --cask redisinsight
brew install mongosh
brew install --cask mongodb-compass

brew tap mongodb/brew
brew install mongodb-community

brew install tfenv
brew install hashicorp/tap/packer
brew install hashicorp/tap/waypoint

brew install wakatime-cli
brew install antigen

brew install elgato-control-center
brew install philips-hue-sync

# Restore configuration files from iCloud
mackup restore

# Install latest version of Ruby
rbenv install 3.1.0
rbenv global 3.1.0

# Install 
nodenv install 20.8.0
nodenv global 20.8.0

3.2 Optional software

brew install --cask intellij-idea
brew install --cask linear-linear
brew install --cask recordit
brew install --cask dash
brew install --cask firefox
brew install --cask macvim
brew install --cask transmission
brew install --cask cyberduck

brew install --cask java8
brew install --cask android-studio
brew install --cask virtualbox
brew install --cask skype
brew install --cask graphiql
brew install --cask vnc-viewer

brew install cocoapods

brew install --HEAD universal-ctags/universal-ctags/universal-ctags

4. Install packages for ruby, node and terraform

node

npm install -g add prettier prettier-eslint eslint commitizen cz-conventional-changelog standard

ruby

gem install ruby-debug-ide debase rcodetools fastri rubocop

terraform

tfenv install latest
tfenv install 0.12.13

pyenv

git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv

5. Install software via mas

mas install 497799835 # xcode
mas install 409201541 # pages
mas install 409203825 # numbers
mas install 409183694 # keynote
mas install 1031280567 # postico
mas install 1116599239 # nordvpn

6. Install vim configuration

# Install Janus	
curl -L https://bit.ly/janus-bootstrap | bash	
cd ~/.janus

git clone https://github.com/w0rp/ale.git	
git clone git://github.com/wakatime/vim-wakatime.git	
git clone git@github.com:terryma/vim-multiple-cursors.git	
git clone https://github.com/mxw/vim-jsx.git	
git clone https://github.com/junegunn/fzf.vim.git	
git clone git@github.com:zerowidth/vim-copy-as-rtf.git	
git clone git@github.com:saltstack/salt-vim.git	
git clone git@github.com:tpope/vim-abolish.git	
git clone https://github.com/hashivim/vim-terraform.git	
git clone git://github.com/digitaltoad/vim-pug.git	
git clone https://github.com/junegunn/fzf.git	
git clone https://github.com/orlando/sexy-railscasts-theme.git

7. Install Fonts

FiraCode - for iTerm2, macvim and vscode

brew install --cask font-fira-code

8. Install Iterm2 theme

https://github.com/tallpants/vscode-theme-iterm2

9. ShiftIt alternative

ShiftIt doesn't work on M1 and is deprecated. There's a migration path by using a custom config with hammerspoon to mimic ShiftIt commands. Source https://github.com/fikovnik/ShiftIt/wiki/The-Hammerspoon-Alternative.

brew install --cask hammerspoon

Give permissions.

mkdir -p ~/.hammerspoon/Spoons
cd ~/.hammerspoon

curl https://github.com/peterklijn/hammerspoon-shiftit/raw/master/Spoons/ShiftIt.spoon.zip -O -J -L
mv ShiftIt.spoon Spoons/

cat <<EOH > ~/.hammerspoon/init.lua
hs.loadSpoon("ShiftIt")
spoon.ShiftIt:bindHotkeys({})
EOH

10. Custom commands

# remove global for ApplePressAndHoldEnabled
defaults delete -g ApplePressAndHoldEnabled

# disable press and hold for VSCode
defaults write com.microsoft.vscode ApplePressAndHoldEnabled -bool false

# disable press and hold for IntellJ
defaults write com.jetbrains.intellij ApplePressAndHoldEnabled -bool false 

# increase keyboard repeat time
defaults write -g InitialKeyRepeat -int 10 # normal minimum is 15 (225 ms)
defaults write -g KeyRepeat -int 1 # normal minimum is 2 (30 ms)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment