When you get a NEW mac as a developer
Environment
Install homebrew
/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install RVM Kit
\curl -sSL https://get.rvm.io | bash -s stable
Install Alfred
brew install alfred
Open hidden-file setting
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
Pretty terminal interface
Install iTerms
brew install iterm2 --cask
Install zsh
brew install zsh zsh-completions
sudo sh -c "echo $(which zsh) >> /etc/shells"
chsh -s $(which zsh)
Install oh my zsh
sh -c “$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Install font
brew tap homebrew/cask-fonts #字體安裝軟體,只需執行一次以後就可以去下載其他字體
Install Powerlevel10K (for zsh theme)
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
then
open ~/.zshrc
Set ZSH_THEME="powerlevel10k/powerlevel10k"
in ~/.zshrc
For workspace
Install Sublime
brew install sublime-text --cask
Create SSH key
ssh-keygen -t rsa -C xxx@xxx.com #password isn't need
SSH key will be created in ~/.ssh
open ~/.ssh
Tip: if you are required to enter the password every time you connect via ssh, add the below into ~/.ssh/config
Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_rsa
Others
Fork
- note
If you need to have ruby first in your PATH run:
echo ‘export PATH=”/usr/local/opt/ruby/bin:$PATH”’ >> ~/.zshrc
For compilers to find ruby you may need to set:
export LDFLAGS=”-L/usr/local/opt/ruby/lib”
export CPPFLAGS=”-I/usr/local/opt/ruby/include”