Skip to content

Instantly share code, notes, and snippets.

@mmasashi
Last active October 11, 2015 05:32
Show Gist options
  • Save mmasashi/cbcd57fd23d4c048be0b to your computer and use it in GitHub Desktop.
Save mmasashi/cbcd57fd23d4c048be0b to your computer and use it in GitHub Desktop.
El Capitan Initial Setup

Prepare for OS update (事前準備)

  • Backup data to Time machine drive
  • Backup some important data to HDD drive manually
  • Make a list which directory should be copied into the new OS
  • Export vicosity config into a file

Clean Install El Capitan (El Capitanのクリーンインストール)

Create El Capitan Boot USB Drive (El Capitanのブートドライブを作成)

  • Need 8GB or more flash memory(USB2.0 is ok)
  • Download Yosemite through AppStore
    • Clicking free upgrade is ok
    • Do not click “continue" on the upgrade view after downloading.
  • Format your USB drive
    • Launch "Disk Utility"
    • Select USB Drive
    • Format: "Mac OS Extended (Journaled)”, Title: Untitled
    • Click "Erase"
  • Run command (20 ~ 30 minutes)
sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app --nointeraction

Install El Capitan (El Capitanのインストール)

  • Shutdown PC
  • Power on Mac with "option" button
  • Select USB drive as a boot device
  • Select "Use English as a main language"
  • Open Disk Utility and format your HD
    • Select your main Drive(Macintosh HD?)
    • Select “Erase” button
      • Name: "Macintosh HD"
      • Format: "Mac OS Extended (Journaled)"
  • Close disk utility and continue installing El Capitan
  • OS X will be installed on the disk "Macintosh HD"
  • Welcome
    • United States
  • Select Your Keyboard
    • U.S.
  • Select Your Wi-Fi Network

Initial Setting (初期設定)

Japanese Setting (日本語設定)

  • [System Preference] -> [Language & Region]
  • Click [+]
  • Select "日本語 Japanese"
  • Click [Use English] as primary language
  • Click "Add Input Source" for Japanese

Keyboard Setting (キーボード設定)

  • [System Preference] -> [Keyboard]
  • Select [Shortcuts] tab
    • Select [Input Sources] menu
    • Turn on "Select next source in Input menu"
      • Change the shortcut to "alt + space"
  • Select [Input Source] tab
    • Turn off other than “Hiragana” on Input modes section
  • Select [Keyboard] menu
    • Click [Modifier Keys]
    • Change "Caps Lock" to "^ Control" of Caps Lock key bind
  • Select [Text] tab
    • Turn off "Use smart quotes and dashes"

Trackpad Setting (トラックパッド設定)

  • [System Preference] -> [Trackpad]
  • Point & Click
    • Turn on "Tap to click"
    • Turn on "Lookup & data detectors"
      • Tap with three fingers
    • Turn on "Force Click and haptic feedback"
  • Scroll & Zoom
    • All ON
  • More Gestures
    • Swipe between pages with three fingers
    • Swipe between full-screen apps with four fingers
    • Notification Center
    • Mission Control
    • Apple Expose
    • Launch pad
    • Show Desktop

Finder Setting (Finderの設定)

General

  • [Finder] -> [Preferences]
  • General
    • Turn on “Hard Disk Drive” to show on Desktop
    • New Finder windows show “${HOME}"
    • Turn off Open folders in tabs instead of new windows
  • Sidebar
    • AirDrop
    • Applications
    • Desktop
    • Documents
    • Downloads
    • $HOME
  • Advanced
    • Turn on “Show all filename extensions"
    • When performing search: “Search the current folder"

Show hidden file(filename start with “.” 隠しファイル(ドットで始まるファイル名)を表示)

# Show hidden files
defaults write com.apple.finder AppleShowAllFiles YES
killall Finder

# Rollback (Hide hidden files)
defaults delete com.apple.finder AppleShowAllFiles
killall Finder

Bar settings

  • [View] -> “Show status bar"
  • [View] -> “Show path bar"

Dock Setting (Dockの設定)

  • [System Preferences] -> [Dock]
  • Turn on “Magnification"
  • Position on screen: “Left'
  • Turn on “Automatically hide and show the Dock"

Screen Capture (スクリーンショットの設定)

# Change default location of screen shots
$ mkdir ~/Desktop/screenshot
$ defaults write com.apple.screencapture location !$

# Disable shadow
$ defaults write com.apple.screencapture disable-shadow -bool true

# Restart SystemUISemarver
$ killall SystemUIServer

Application Installation (アプリケーションのインストール)

Application (App Store)

  • Evernote
  • Xcode
  • iWork
    • Pages
    • Numbers
    • Keynote
  • Twitter
  • Quick Note
  • 3Hub
  • Stufflt Expander
  • Degrees
  • Miniusage
  • Pixelmator
  • istat mini
  • Slack

Application (Manual Install)

Browser

  • google-chrome
  • firefox
  • opera

editor

  • coteditor
  • macvim
  • mou
  • zeroxed
  • diffmerge

Communication

  • skype
  • slack

Network access

  • filezilla
  • cyberduck
  • dropbox

Terminal

  • iterm2

Virtual Machine

  • virtualbox
  • vmware-fusion

Mobile

  • iexplorer
  • android-file-transfer

Reader

  • kobo

Multimedia

  • silverlight
  • spotify

Status bar

  • clipmenu

Utility

  • licecap
  • bettertouchtool
  • cd-to
  • omnidisksweeper
  • Get Plain Text
  • NoSleep
  • viscosity
  • VideoMessageExplorer
  • Wireshark

Install homebrew

  • Install Xcode from App Store
  • Run xcode-select --install to install command-line tools
  • Install homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Check homebrew status
brew doctor
  • Install brew command
brew install <application name>

  • Install homebrew-bundle
brew tap Homebrew/bundle
# Pull Brewfile from github repos
git clone [email protected]:mmasashi/Brewfile.git
cd Brewfile
# Install all packages
brew bundle

Application (Download from web & install)

  • iText edit

Paid Applications

  • Macrosoft Office for Mac
  • VMWare Fusion

Application Settings (アプリの設定)

  • Dropbox
    • Launch & login
  • cdto
    • Open finder and go to "/opt/homebrew-cask/Caskroom/cd-to/2.6.0/cdto_2_6/iterm" path
    • Hold "command" button and drag cdto icon to finder menu area
  • iStat mini
    • Open application and register on notification center
  • FormatMatch
    • Launch app and open preference
    • Turn on "Automatically start FormatMatch at login"

Development Environment Setting (開発環境設定)

Preparation

  • copy .ssh directory from backup
  • copy Fonts files from backup to ~/Library/Fonts

Install dotfiles

  • Clone dotfiels and setup
cd $HOME
git clone https://github.com/mmasashi/dotfiles
cd dotfiles
bash setup.sh
git submodule update --init
  • Install vim plugins
    • Launch “vim”
    • Run :NeoBundleInstall

Terminal Setting

Change shell to zsh

  • Open “Terminal.app"
  • Open “Preferences"
    • Shell open with Command “/usr/local/bin/zsh"
  • Add “/usr/local/bin/zsh” (homebrew’s zsh)
vi /etc/shells

# add the following line
/usr/local/bin/zsh
  • Change the login shell
chpass -s /usr/local/bin/zsh
  • Check the update
chpass

iTerm2 Setting

  • Import terminal
  • Profiles
    • General
      • Command: Login shell
      • Working Directory: Reuse previous session’s directory
    • Text
      • Regular Font: Inconsolata, Regular, 13pt
      • Non-ASCII Font: Ricty for Powerline, Regular, 13pt
        • Horizontal: 5, Vertical: 1.1
    • Window
      • Adjust Transparency and Blur
    • Terminal
      • Scrollback Lines: 9,999
    • Session
      • Miscellaneous
        • Turn on "Automatically log session input files in" and set "~/logs/iterm2" directory

Ruby Setting

Install rbenv

brew install openssl
brew install readline
brew install rbenv
brew install ruby-build
brew install mysql
brew install autoconf
brew tap homebrew/dupes
brew install apple-gcc42
brew install v8   # For rails 

Install Ruby

  • Show the supported ruby versions
rbenv install -l
  • Install Ruby
rbenv install 2.2.3
rbenv rehash
rbenv global 2.2.3
  • Install ruby gems
gem install bundle pry awesome_print aws-sdk fluentd

Trouble shooting

Ruby gems

  • When getting the following error when installing nokogiri
The file "/usr/include/iconv.h" is missing in your build environment,
which means you haven't installed Xcode Command Line Tools properly.
  • Run xcode-select --install to install command line tools

  • When getting an error during running bundle install

    • Error: ./project.h:107:10: fatal error: 'openssl/ssl.h' file not found
    • Action: bundle config build.eventmachine --with-cppflags=-I$(brew --prefix openssl)/include
  • When getting an error during running bundle install

    • Error:
  checking for v8.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.
  • Bundle config

$ cat ~/.bundle/config
---
BUNDLE_PATH: vendor/bundle
BUNDLE_BUILD__LIBV8: --with-system-v8
BUNDLE_BUILD__THERUBYRACER: --with-system-v8
BUNDLE_BUILD__EVENTMACHINE: --with-cppflags=-I/usr/local/opt/openssl/include
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment