Skip to content

Instantly share code, notes, and snippets.

@jimmynotjim
Last active April 19, 2024 05:26
Show Gist options
  • Save jimmynotjim/7617722 to your computer and use it in GitHub Desktop.
Save jimmynotjim/7617722 to your computer and use it in GitHub Desktop.
Setup macOS 12 Monterey

Leaving this for historical reasons, but with the latest iteration I set up proper dotfiles. Check em out

Setup macOS with a Clean Install

After too many years of tinkering my machine is a bit all over. With Mojave High Sierra Montery I wanted to start fresh

1. Run Software Update

Make sure everything is up to date.

Screen Shot 2022-07-22 at 5 14 32 PM

2. Install XCode

xcode-select --install

3. Set OSX to show hidden files

defaults write com.apple.finder AppleShowAllFiles -boolean true
killall Finder

4. Configure Git and Generate SSH keys for GitHub

Copy the attached gitconfig settings and set your user info (left out to avoid issues)

cd ~/ && curl -O https://gist.github.com/jimmynotjim/7622492/raw/5e895d1da525594c14e1052feb5c9587fb99a41c/.gitconfig
git config --global user.name "Your Name Here"
git config --global user.email youremail@example.com

Visit GitHub's official guide for instructions.

5. Clone and Install Bash-It

Visit the Bash-It repo for more details.

Chruby is required for the rest of the setup, be sure to enable it when setting up Bash-It plugins

git clone --depth=1 https://github.com/Bash-it/bash-it.git ~/.bash_it
~/.bash_it/install.sh --interactive

Open a new terminal window to use the Bash-It options you've set

6. Install Material Theme

cd ~/ && curl -O https://gist.githubusercontent.com/mvaneijgen/4c56701215847dd5ddcf/raw/d78a58ac38197f3b46afc38617e31a07f39370d2/material-theme.terminal && open ./material-theme.terminal

Open Terminal > Preferences (or CMD + ,) and select "Default" to make Material Theme the default theme

7. Clone and Install Brew-It

Many apps can be installed through Homebrew, homebrew-cask, and mas-cli which makes the process way simpler

Visit my Brew-It repo for more details.

git clone git@github.com:jimmynotjim/brew-it.git ~/.brew_it
~/.brew_it/install.sh
brew update
brew upgrade

8. Set up Ruby

Add eval "$(rbenv init -)" to your .bash_profile and run the rbenv-doctor script

curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash

If everything is working fine, set up your preferred version of Ruby and install Bundler.

rbenv install 2.5.0
rbenv global 2.5.0
gem install bundler

9. Update PATH

Open .bash_profile and make the following edits

  • Add local bin and local sbin ahead of $PATH /usr/local/bin:/usr/local/sbin:

10. Manual App Installs

Unfortunately some apps aren't available through homebrew, so you need to install it manually.

Manually

11. Install Node and Global Packages

As part of the brew installation nvm should have been installed. It requires a bit of manual setup.

Create NVM's working directory if it doesn't exist:

mkdir ~/.nvm

Add the following to ~/.bash_profile:

export NVM_DIR="$HOME/.nvm"
. "/usr/local/opt/nvm/nvm.sh"

Install your prefered version of node

nvm install 9

Install global packages

npm install -g yo bower gulp

12. Configure Sublime Text

ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl  /usr/local/bin/subl

13. Install Alfred Workflows

Download Alfred Workflow Searcher

WF:

  • Audio Switch
  • Colors
  • Dash
  • Domainr
  • Emoji
  • Github Commands
  • Kill Process
  • MyIP
  • Package Managers
  • TerminalFinder
  • TimeIn
  • Transmit Favorites
  • VirtualBox Control

Manual:

14. Set NPM user

npm adduser username

15. Download IE test VMs for VirtualBox

These take a while to download, so maybe do it on a separate day as a background process.

# IE8 - XP
curl -O "https://az412801.vo.msecnd.net/vhd/IEKitV1_Final/VirtualBox/OSX/IE8_XP/IE8.XP.For.MacVirtualBox.ova"

# IE9 - Win7
curl -O "https://az412801.vo.msecnd.net/vhd/IEKitV1_Final/VirtualBox/OSX/IE9_Win7/IE9.Win7.For.MacVirtualBox.part{1.sfx,2.rar,3.rar,4.rar,5.rar}"

# IE10 - Win8
curl -O "https://az412801.vo.msecnd.net/vhd/IEKitV1_Final/VirtualBox/OSX/IE10_Win8/IE10.Win8.For.MacVirtualBox.part{1.sfx,2.rar,3.rar}"

16. Download a base Ubuntu box for Vagrant

I'm using Vagrant to setup a few VMs locally for development.

Ubuntu 12.04 LTS 64-bits

vagrant box add precise64 http://files.vagrantup.com/precise64.box

All done, have fun!

This process has been borrowed from here, here, here, here, and here

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