Skip to content

Instantly share code, notes, and snippets.

@shoya140
Last active June 27, 2016 15:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shoya140/1c081c6e429168aaeb8f to your computer and use it in GitHub Desktop.
Save shoya140/1c081c6e429168aaeb8f to your computer and use it in GitHub Desktop.
Mac設定(簡易版)

Finder設定

階層表示 参考

不可視ファイルを表示

defaults write com.apple.finder AppleShowAllFiles true

フォルダを英語名に 参考

cd /System/Library/CoreServices/SystemFolderLocalizations/ja.lproj
sudo mv SystemFolderLocalizations.strings SystemFolderLocalizations.strings.back
sudo cp ../en.lproj/SystemFolderLocalizations.strings .
killall Finder

Homebrewインストール

xcode-select --install

Homebrew

.bashrcや.zshrcに追記

# brew
export PATH=/usr/local/bin:$PATH
export PATH=/usr/local/sbin:$PATH
export HOMEBREW_CASK_OPTS="--appdir=/Applications"

brewfile作成

#!/bin/sh
brew update
brew upgrade

brew tap homebrew/science || true
brew tap homebrew/dupes || true
brew tap caskroom/cask || true
brew tap caskroom/versions || true

brew install zsh
brew install git
brew install mercurial
brew install wget
brew install tree
brew install rename
brew install freetype
brew install emacs --japanese --cocoa --srgb --with-gnutls -v
brew install pyenv-virtualenv
brew install plenv perl-build
brew install rbenv ruby-build
brew install gcc
brew install opencv --with-python3

brew cask install alfred

brew cask cleanup
brew cleanup
brew linkapps

3. Ruby, Perl, Pythonインストール

# 例
$ pyenv install -l
$ pyenv install 3.5.10
$ pyenv global 3.5.10

.bashrcや.zshrcに追記

# python
export PYENV_ROOT="${HOME}/.pyenv"
if [ -d "${PYENV_ROOT}" ]; then
    export PATH=${PYENV_ROOT}/bin:$PATH
    eval "$(pyenv init -)"
    eval "$(pyenv virtualenv-init -)"
fi

# ruby
export RBENV_ROOT="${HOME}/.rbenv"
if [ -d "${RBENV_ROOT}" ]; then
    export PATH=${RBENV_ROOT}/bin:$PATH
    eval "$(rbenv init - zsh)"
fi

# perl
export PLENV_ROOT="${HOME}/.plenv"
if [ -d "${PLENV_ROOT}" ]; then
    export PATH=${PLENV_ROOT}/bin:$PATH
    eval "$(plenv init - zsh)"
fi

OpenCV

# python2系, brew install pythonの場合
echo /usr/local/opt/opencv3/lib/python2.7/site-packages > /usr/local/lib/python2.7/site-packages/opencv3.pth
# python2系, virtualenvの場合
echo /usr/local/opt/opencv3/lib/python2.7/site-packages >  $(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/opencv3.pth

# python3系, brew install python3の場合
echo /usr/local/opt/opencv3/lib/python3.5/site-packages > /usr/local/lib/python3.5/site-packages/opencv3.pth
# python3系, virtualenvの場合
echo /usr/local/opt/opencv3/lib/python3.5/site-packages >  $(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/opencv3.pth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment