Skip to content

Instantly share code, notes, and snippets.

@angelyordanov
Forked from millermedeiros/osx_setup.md
Last active March 23, 2023 14:07
Show Gist options
  • Save angelyordanov/905c26094c5780a55a86354a4cd57a33 to your computer and use it in GitHub Desktop.
Save angelyordanov/905c26094c5780a55a86354a4cd57a33 to your computer and use it in GitHub Desktop.
Mac OS X setup

Setup Mac OS X

Edit: I've done the same process every couple years since 2013 (Mountain Lion, Mavericks and High Sierra).

I just replaced the hard drive of my mbp and decided to do a clean install of Mountain Lion (10.8.5) since I was still using Snow Leopard (10.6.8).

I kinda regret for not using Boxen to automate the process, but TBH I have this laptop for almost 3yrs and this is the first time I needed to reinstall everything, maybe the next time...

This gist is just a personal reference in case I need to do it all over again. *I'm by no means an OSX/nix expert, use with care.

Setup

1. Run software update

Make sure everything is up to date.

2. Install Xcode and/or "Command Line Tools"

NOTE: homebrew now automatically installs command line tools, so you can skip this step.

"Command Line Tools" can be downloaded separate from Xcode at https://developer.apple.com/downloads/ - It is way smaller than installing the whole Xcode but might not work for all cases tho.

Xcode can be found on App Store. preferred

More info on how to download Command Line Tools inside XCode can be found on StackOverflow

3. Install homebrew and other CLI tools

http://brew.sh/

# install homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

# install nvm
touch ~/.bash_profile
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash

# install node
nvm install node

# set launchd PATH env var to enable Finder launched apps using node/npm (e.g. Source Tree)
sudo launchctl config user path `echo $PATH` # this should be done when switching node versions with NVM as well

brew install mas # Mac App Store command line interface

4. Install softwares

homebrew-cask

Many softwares can be installed through homebrew-cask which makes the process way simpler:

# 2023
brew install --cask onyx
brew install --cask raycast
brew install --cask shottr

# essential
brew cask install dropbox
brew cask install google-backup-and-sync
brew cask install microsoft-office # onedrive included
brew cask install 1password
brew cask install google-chrome
brew cask install tripmode
brew cask install spectacle
brew cask install coconutbattery
brew cask install mpv
brew cask install transmission

# utils
brew cask install the-unarchiver

# dev
brew cask install virtualbox
brew cask install sourcetree
brew cask install visual-studio-code
brew cask install azure-data-studio
brew cask install docker
brew cask install firefox
brew cask install slack

# others
brew cask install skype

App Store

mas install 1295203466 # Microsoft Remote Desktop (10.3.3)
mas install 937984704 # Amphetamine (4.2)

5. Borrow a few OSX settings from mathiasbynens dotfiles

###############################################################################
# Finder                                                                      #
###############################################################################

# Finder: show hidden files by default
defaults write com.apple.finder AppleShowAllFiles -bool true

# Finder: show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true

# Finder: show status bar
defaults write com.apple.finder ShowStatusBar -bool true

# Finder: allow text selection in Quick Look
defaults write com.apple.finder QLEnableTextSelection -bool true

# Disable the warning when changing a file extension
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false

###############################################################################
# Address Book, Dashboard, iCal, TextEdit, and Disk Utility                   #
###############################################################################

# Use plain text mode for new TextEdit documents
defaults write com.apple.TextEdit RichText -int 0

# Open and save files as UTF-8 in TextEdit
defaults write com.apple.TextEdit PlainTextEncoding -int 4
defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4

source: https://github.com/mathiasbynens/dotfiles/blob/master/.macos

6. Create/Update ~/.bash_profile

7. Create/Update ~/.gitconfig

; I removed the [user] block on purpose so other people don't copy it by mistake
; you will need to set these values
[core]
  editor = code --wait --new-window
[merge]
  conflictstyle = diff3
[diff]
  tool = vscode
[difftool "vscode"]
  cmd = code --wait --new-window --diff $LOCAL $REMOTE

You will need to set the user name and email (removed from .gitconfig to avoid errors):

git config --global user.name "Your Name Here"
git config --global user.email youremail@example.com

8. Configure npm and generate SSH keys for github

Need to set the npm user:

npm adduser

And also generate SSH keys for github

9. Download IE test VMs for VirtualBox

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

https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/

10. Install AX88772C Driver to enable the Secomp VALUE USB 2.0 to Fast Ethernet Converter

https://www.asix.com.tw/download.php?sub=driverdetail&PItemID=136

11. Profit!

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