Skip to content

Instantly share code, notes, and snippets.

@nanusdad
Forked from orlando/mac-setup.md
Created May 13, 2024 17:39
Show Gist options
  • Save nanusdad/6b512fc7ab488a0e6654cd38eed3af81 to your computer and use it in GitHub Desktop.
Save nanusdad/6b512fc7ab488a0e6654cd38eed3af81 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 [email protected]: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 [email protected]:zerowidth/vim-copy-as-rtf.git	
git clone [email protected]:saltstack/salt-vim.git	
git clone [email protected]: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