Skip to content

Custom recipe to get a new Mac running from scratch, setup applications and developer environment

Notifications You must be signed in to change notification settings

joshbuchea/config

Repository files navigation

Config

Config is a recipe to get a new Mac running from scratch, setup applications and developer environment. I use this repo to keep track of the important software and steps required to have a functioning system after a fresh install.

You are encouraged to fork this and modify it to your heart's content to match your own needs. Please be sure to change your .gitconfig name and email address!

Dev Config

  • Install Homebrew: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    • Homebrew will install Xcode Command Line Tools (manually install with xcode-select --install)
  • Install Xcode from the App Store

iTerm2

  • Install iTerm2: brew install --cask iterm2
  • Load Custom Profile from iterm2/Josh Custom iTerm2 Profile.json
  • Set Theme: Preferences > Appearance > General > Theme: Choose Minimal
  • Disable highlight on click: Settings > General > Selection > Uncheck "Clicking on a command selects it to restrict Find and Filter"
  • Always open the React Native packager with iTerm, associate .command files with iTerm:
    • Open Finder
    • Find any file with the .command extension ($PROJECT/node_modules/react-native/scripts/launchPackager.command)
    • Right-click on .command file to bring up context menu
    • Choose Get Info
    • Change Open with to iterm.app
    • Click Change All...

Oh My Zsh

  • Install Oh My Zsh: sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
  • Install Custom Plugins:
    • zsh-autosuggestions: git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
    • zsh-syntax-highlighting: git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
  • Add Installed Custom Plugins to ~/.zshrc: plugins=(git z zsh-autosuggestions zsh-syntax-highlighting)
  • Copy Personal Custom Theme joshbuchea.zsh-theme to: ~/.oh-my-zsh/custom/themes

RVM

Install RVM stable with ruby:

  • Install GnuPG brew install gnupg gnupg2
  • Install GPG keys to verify installation package: gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
  • Install rvm stable with ruby: \curl -sSL https://get.rvm.io | bash -s stable --ruby

NVM & Node.js

  • Install nvm
  • Add nvm export entry to .zshrc file:
    export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
    [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
  • Install latest stable version of Node.js: nvm install stable
  • Install latest LTS version of Node.js: nvm install --lts
  • Upgrading to latest release of major version of Node.js: nvm install 16
  • Upgrading to specific version of Node.js: nvm install v10.15.3
  • Upgrading npm to latest version: nvm use stable && npm install npm@latest -g
  • Using latest release of major version of Node.js: nvm use 16
  • Set or change default version of Node.js: nvm alias default 16.15.1

Package Managers

NPM is installed with Node and Bower's dead baby 💀

  • Install Yarn: npm install -g yarn
    • it's safe to upgrade using the command provided in the terminal after running yarn: curl --compressed -o- -L https://yarnpkg.com/install.sh | bash
  • Install Composer: brew install composer

React Native

Prerequisites:

  • Install Node (should have been installed in previous step)
  • Install Watchman: brew install watchman

iOS:

  • Install Xcode (should have been installed in previous step
  • Install Xcode Command Line Tools (should have been installed in previous step)
  • Install CocoaPods: gem install cocoapods
    • don't preface command with sudo since we use rvm
    • use this same command to update cocoapods
    • previously used brew install cocoapods to install

Android:

  • Install Android Studio: brew install --cask android-studio
  • Install JDK: brew install --cask adoptopenjdk/openjdk/adoptopenjdk8
  • Follow remaining steps for Android RN Docs: Setting up the development environment
    • Configure SDK
      • SDK Platforms
        • Show Package Details: Check
        • Android 10 (Q) SDK
          • Android SDK Platform 29: Check
          • Intel x86 Atom_64 System Image or Google APIs Intel x86 Atom System Image: Check
      • SDK Tools
        • Show Package Details: Check
        • Android SDK Build-Tools
          • 29.0.2: Check
          • Android SDK Command-line Tools (latest)
            • Android SDK Command-line Tools (latest): Check
      • Press Apply Button
      • Accept license agreements
      • Press Done Button once installation is complete
    • Add ANDROID_HOME environment variable to ~/.zshrc (below rvm and nvm)

Expo:

  • Install Expo (and CRNA): npm install -g expo-cli
    • Upgrade using the same command

Always Open Packager with iTerm:

We'll do this by Associating .command files with iTerm.

  • Open Finder.app
  • Find any .command file
  • Right-click to bring up the context menu
  • Choose Get Info
  • Change Open with to iterm.app
  • Click Change All...

Mobile Dev Tools

Jekyll

  • Install Bundler: gem install bundler
  • Install Jekyll: gem install jekyll

Git

  • Verify git is installed: git --version
  • Set username (global): git config --global user.name "Josh Buchea"
  • Set commit email address (global): git config --global user.email "[email protected]"
  • Set credential helper to OSX Keychain (global): git config --global credential.helper osxkeychain (prevents SourceTree from continuously prompting for GitHub password)
  • Generate or copy SSH key(s) ~/.ssh/id_rsa, ~/.ssh/id_rsa.pub

Install Software

The software selected is software that is "tried and true" --- software I need after any fresh install. I often install other software not listed here, but is handled in a case-by-case basis.

Install from App Store

Install from Third-Party Websites

Install with Homebrew

Config

Config Apps

Dropbox

  • Preferences > Network > Bandwidth: Change Settings... > Upload rate > Don't limit

Firefox

  • Restore previous session on start: Preferences > General > Startup > Open previous windows and tabs

Safari

  • Show full website address: Preferences > Advanced > Smart Search Field: Show full website address
  • Enable Developer menu: Preferences > Advanced > Show Develop menu in menu bar
  • Disable swipe between pages: System Preferences > Trackpad > More Gestures > Swipe between pages

SourceTree

  • Enable Dark Theme: View > Theme > Dark

Clean Up Mac

What to do before you sell, give away, or trade in your Mac

Important tasks to complete before surrendering a Mac:

  • Remove Dropbox
  • Disassociate the computer with the Mac App Store: Store > Sign Out
  • Disassociate the computer with iMessage in Messages.app: Preferences... > iMessage > Settings > Sign Out
  • Disassociate the computer with the Apple Music: Account > Authorizations > Deauthorize This Computer...
  • Sign out of Apple Music: Account > Sign Out
  • Sign out of iCloud: System Preferences > Apple ID > Overview > Sign Out
  • Turn off Find My Mac: System Preferences > Internet Accounts > iCloud > Uncheck Find My Mac
  • Remove iCloud Drive (Archive) folder: ~/iCloud Drive (Archive)
  • Remove Photos Library: ~/Pictures/Photos Library.photoslibrary
  • Deauthorize any other apps (Adobe Creative Suite, ?)
  • Remove the Mac from my support profile
  • Disable FileVault Drive Encryption: System Preferences > Security & Privacy > FileVault > Turn Off FileVault... (speeds up the disk erase process)
  • If desired, reinstall macOS as per Apple’s instructions

Note: Borrowed some steps from this blog post by Casey Liss: Starting Anew on macOS

About

Custom recipe to get a new Mac running from scratch, setup applications and developer environment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published