First thing you need to do, on any OS actually, is update the system! For that: Apple menu () > About This Mac > Software Update.
Run the defaults script to configure most defaults for the OS and native applications.
$ ./set-defaults.sh
- Enable FileVault
- Enable Firewall
- Uncheck everything except for Enable Stealth Mode
- Set up Password, Apple ID, Picture, etc.
- Add iCloud account for
iCloud Drive
,Photos
,Reminders
,Safari
,Notes
,Keychain
,Find My Mac
- Add Google account for
Contacts
,Mail
andCalendar
- Add Facebook account for
Notifications
andShare Menu
- Toolbar
- Add "New Folder" icon
- Sidebar
- Add
Home
andProjects
directories - Remove tags
- Add
- Select
Orion
server as backup destination - Backup automatically
Install the Aerial screensaver for Mac here. Enable it in System Preferences.
Install Xcode from the App store or the Apple developer website.
For installing Xcode command line tools run the command
$ xcode-select --install
It'll prompt you to install the command line tools. Follow the instructions and now you have Xcode and Xcode command line tools both installed and running.
In the terminal paste the following line (without the $), hit Enter, and follow the steps on the screen:
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install brew casks:
$ brew tap caskroom/cask
One thing we need to do is tell the system to use programs installed by Hombrew (in /usr/local/bin
) rather than the OS default if it exists. We do this by adding /usr/local/bin
to your $PATH
environment variable:
$ echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bash_profile
Open an new terminal tab with Cmd+T (you should also close the old one), then run the following command to make sure everything works:
$ brew doctor
Some plugins to enable different files to work with Mac Quicklook. Includes features like syntax highlighting, markdown rendering, preview of jsons, patch files, csv, zip files etc.
QUICK_LOOK_PLUGINS=(
qlcolorcode
qlstephen
qlmarkdown
quicklook-json
quicklook-csv
betterzipql
webpquicklook
)
echo "Installing Quick Look plugins..."
brew cask install ${QUICK_LOOK_PLUGINS[@]}
Most applications can be installed with brew:
CASKS=(
arq
atom
docker-toolbox
dropbox
flux
google-chrome
google-drive
google-hangouts
grammarly
iterm2
keyfinder
macdown
postico
pycharm
remote-play
skype
slack
sublime-text
transmission
virtualbox
vlc
whatsapp
)
echo "Installing cask apps..."
brew cask install ${CASKS[@]}
- Download the Solarized Dark iTerm2 color scheme from here. And then set these to your default profile colors.
- Download the patched Menlo Powerline font from here. And set to 14pt for regular text, 15pt for non-ASCII text.
By default, word jumps (option + → or ←) do not work. To enable these, go to "iTerm -> Preferences -> Profiles -> Keys". Press the + sign under the list of key mappings and add the following sequences:
Option + right
⌥→
Send Escape Sequence
f
Option + left
⌥←
Send Escape Sequence
b
Install zsh, zsh completions and zsh-syntax-highlighting using homebrew:
$ brew install zsh zsh-completions zsh-syntax-highlighting
$ chsh -s /usr/local/bin/zsh
Install oh-my-zsh on top of zsh to get additional functionality
$ curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
Set up ~/.zshrc
:
ZSH_THEME="agnoster"
plugins=(brew colored-man-pages docker git git-flow-avh pip pyenv extract urltools)
DEFAULT_USER=`whoami`
# Add env.sh
source ~/env.sh
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
Create ~/env.sh
:
#!/bin/zsh
# PATH
export PATH="/usr/local/bin:$$PATH" # FIX: the double "$$"
export EDITOR='subl -w'
# mkdir and cd
function mkcd() { mkdir -p "$@" && cd "$_"; }
# Aliases
alias ll="ls -lh"
# Use sublimetext for editing config files
alias zshconfig="subl ~/.zshrc"
alias envconfig="subl ~/env.sh"
To install, simply run:
$ brew install git
Next, define the git user:
$ git config --global user.name "Your Name"
$ git config --global user.email "[email protected]"
$ git config --global credential.helper osxkeychain
First, we need to check for existing SSH keys on your computer. Open up your Terminal and type:
$ cd ~/.ssh
$ ls -al
Use a strong passphrase for keys.
$ ssh-keygen -t rsa -b 4096 -C "Your Name (MacBook) <[email protected]>"
Add the public key to GitHub and BitBucket.
Install pyenv
using homebrew:
$ brew install pyenv
After installing, add pyenv init to your shell to enable shims and autocompletion.
$ echo 'eval "$(pyenv init -)"' >> ~/env.sh
Open a new terminal and enter these commands:
$ pyenv install 3.6.1
$ pyenv global 3.6.1
Open another new terminal, install Jupyter and iPython:
pip3 install --upgrade pip
pip3 install jupyter ipython
To install pipenv
, enter this command:
$ pip install pipenv
To install or update nvm
, you can use the install script using cURL:
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
Open a new terminal window and enter this command:
$ nvm install --lts
To upgrade the copy of npm that is provided with Node.js, run this command in a new terminal:
$ npm -g upgrade npm
Install the CLI:
$ brew install awscli
Configure profiles:
$ aws configure --profile personal
AWS Access Key ID [None]: **REDACTED**
AWS Secret Access Key [None]: **REDACTED**
Default region name [None]: ap-southeast-2
Default output format [None]: text
$ aws configure --profile porter
AWS Access Key ID [None]: **REDACTED**
AWS Secret Access Key [None]: **REDACTED**
Default region name [None]: ap-southeast-2
Default output format [None]: text
Create some basic folder structure:
echo "Creating Projects folder..."
cd ~
[[ ! -d Projects ]] && mkdir Projects
echo "Creating Downloads folder structure..."
cd ~/Downloads
[[ ! -d Applications ]] && mkdir Applications
[[ ! -d Misc ]] && mkdir Misc
[[ ! -d Movies ]] && mkdir Movies
[[ ! -d Music ]] && mkdir Music
[[ ! -d "TV Shows" ]] && mkdir "TV Shows"
echo "Creating Pictures folder structure..."
cd ~/Pictures
[[ ! -d Wallpapers ]] && mkdir Wallpapers
cd ~
echo "Done!"