This article describes effective procedures for developer with Ruby/Java/JavaScript to setup Mac Majove.
๐ Install some applications For development
For productivity
๐ผ Homebrew Before any installation, you should approve Xcode license agreement by the following command:
You should execute the following command to install Homebrew :
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install) "
If you are asked about Xcode Command line tool while installing with Homebrew, please install it.
๐ Oh-my-zsh If you want to use a coftable Zsh customized by the community, letโs installrobbyrussell/oh-my-zsh .
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh) "
๐ฎ Git You should install Git command line tool:
brew install git git config --global user.name "USER_NAME" git config --global user.email email@example.com git config --global tag.sort version:refname
After installing Git, we recommend to set global .gitignore
:
brew install gibo gibo dump JetBrains macOS Ruby Rails Node > ~/.gitignore git config --global --add core.excludesfile "$HOME /.gitignore"
You should set basic passwords to skip filling password by vi ~/.netrc
:
machine github.com login USERNAME password PASSWORD
In addition, please add a alias git push-f
to vi ~/.gitconfig
[alias ] push-f = push --force-with-lease
๐ฝ autojump If you want to fill a path more quickly,wting/autojump is one of the greatest solutions.
After installing, set the following setting by vi ~/.zshrc
[[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . $(brew --prefix)/etc/profile.d/autojump.sh
After the setting, execute the following command to reflect the setting:
๐ฏ fzf
After installing, set the following setting by vi ~/.zshrc
br () { git checkout $(git branch --format '%(refname:short)' | fzf --layout=reverse) }
After the setting, execute the following command to reflect the setting:
๐ Font HackGen Ricty is a fonts for programming, if you want to try it, please set the following command:
brew tap homebrew/cask-fonts brew cask install font-hackgen defaults -currentHost write -globalDomain AppleFontSmoothing -int 2
๐ฝ rbenv To avoid installing unnecessary documents, add the following setting vim ~/.gemrc
:
install: --no-document update: --no-document
After the above setting, letโs install the following rbenv and Ruby-build:
brew install rbenv ruby-build git clone https://github.com/sstephenson/rbenv-default-gems.git ~/.rbenv/plugins/rbenv-default-gems echo 'bundler\nrails\npg\npry' > ~/.rbenv/default-gems
Edit the following setting by vi ~/.zshrc
:
[[ -d ~/.rbenv ]] && \ export PATH=${HOME} /.rbenv/bin:${PATH} && \ eval "$(rbenv init -) "
The setting is reflected by the following command:
Install Ruby by rbenv:
rbenv install -l rbenv install 2.5.0 rbenv global 2.5.0
๐ Node Version Manager Please refer to nvm: Node Version Manager and install it.
๐ Install Yarn
๐ธ PostgreSQL Install PostgreSQL:
brew install postgresql brew services start postgresql
๐ Docker (Optional) Please set alias to vi .zshrc
:
alias d='docker' alias dc='docker-compose' alias dm='docker-machine'
After setting, reflect the upper settings:
๐ฃ Optional Java Download JDK from Java SE - Downloads / Oracle and install it.
After install JDK, you should install Maven & gradle too.
brew install maven32 gradle
After that, please write the bellow code in .zshrc
:
export JAVA_HOME=`/usr/libexec/java_home -v 10.0.2`
Google Cloud Platform SDK Please refer to Cloud SDK | Cloud SDK and install it.
Heroku CLI brew install heroku/brew/heroku
Chromedriver If you use Chromedriver for selenium test or etc, please execute the follows:
brew tap homebrew/cask brew cask install chromedriver
IntelliJ Please refer to the following articles and configure it.
Shortcut for Ruby dev Please write the bellow code in .zshrc
:
export PATH=$HOME /.nodebrew/current/bin:$PATH alias rspec="bundle exec rspec" alias rake="bundle exec rake" alias rubocop="bundle exec rubocop"
Shortcut for Source Tree ln -s /Applications/SourceTree.app/Contents/Resources/stree /usr/local /bin/
Change shortcut to change active window Application > System Preferences > Keybord > Shortcut > Keybord > Move focus next window
Change shortcut for select the previous source Application > System Preferences > Keybord > Shortcut > Input Source > Select the previous source > command + space
Change shortcut for show spotlight search Application > System Preferences > Keybord > Shortcut > Spotlight > Show spotlight search > control + space
Change computer name Application > System Preferences > Sharing > Computer Name
Change cursor speed Application > System Preferences > Mouse > Tracking Speed
Improve Sound Quality sudo defaults write bluetoothaudiod "Enable AptX codec" -bool true sudo defaults write bluetoothaudiod "Enable AAC codec" -bool true
Keytype speed defaults write -g KeyRepeat -int 2 defaults write -g InitialKeyRepeat -int 12
๐ References
๐ฅ Recommended VPS Service
VULTR provides high performance cloud compute environment for you.
Vultr has 15 data-centers strategically placed around the globe, you can use a VPS with 512 MB memory for just $ 2.5 / month ($ 0.004 / hour).
In addition, Vultr is up to 4 times faster than the competition, so please check it => Check Benchmark Results !!