Lazuli

らずり

MBA 初期化ログ

MBA 買った。
色々とインストールして初期化したことを残しておく。

Homebrew

何はともあれ Homebrew をインストールするところから。

$ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
$ brew doctor
$ brew update


自分用の Brewfile が Github にあるからそれを落としてあれやこれやとインストール。
途中、何回かパスワード聞かれるから定期的にターミナル眺めるとよい。
app2641/homebrew-mycask

$ git clone https://github.com/app2641/homebrew-mycask
$ cd homebrew-mycask
$ brew bundle

その他諸々のアプリケーション

Brewfile でインストール出来ないアプリを落としていく。
頑張れば homebrew-cask で出来るのかもしれないけど調べてない。

Hoster

Hostsファイルの管理してくれるやつ。
http://www.redwinder.com/macapp/hoster/

MacWinZipper

windowsで解凍したときおかしな感じにならない圧縮アプリケーション。
http://tidajapan.com/macwinzipper

ToyViewer

画像加工する感じのやつ。
https://itunes.apple.com/jp/app/toyviewer/id414298354

composer

PHPer 御用達。

curl -sS https://getcomposer.org/installer | php
mv ./composer.phar /usr/bin/

.bash_profile の生成

.bashrc 読み込むようにしておく

if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi

Finder で隠しファイルを見たい

隠しファイル見れないとやってられない。

$ defaults write com.apple.finder AppleShowAllFiles TRUE
$ killall Finder

Bash で大文字小文字の区別をなくしたい

大文字小文字関係なく Tab 保管出来るようになるやつ。
個人の好みがありそうな。

$ touch ~/.inputrc
$ vi ~/.inputrc

下記を書き込む。

set completion-ignore-case on

PowerLine Font をインストール

$ git clone https://github.com/Lokaltog/powerline-fonts

MySQL のセットアップ

とりあえずこんなんを打った。

$ unset TMPDIR
$ mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
$ sudo mysql.server start
Starting MySQL
. ERROR! The server quit without updating PID file (/usr/local/var/mysql/***.local.pid).

エラーで死ぬ。
なんかパーミッションがおかしいらしい。

$ sudo chown -R _mysql:_mysql /usr/local/var/mysql
$ sudo mysql.server start
Starting MySQL
. SUCCESS!

パスワードの設定。
うぇーい。

$ sudo mysqladmin -u root password 'new-password'

起動スクリプトもやる。

$ cp /usr/local/Cellar/mysql/5.6.17_1/homebrew.mxcl.mysql.plist ~/Library/LaunchAgents/
$ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist

ターミナルに git ブランチ名を表示する

.bashrc に以下を書き込む。

source /usr/local/Cellar/git/1.9.2/etc/bash_completion.d/git-completion.bash
source /usr/local/Cellar/git/1.9.2/etc/bash_completion.d/git-prompt.sh
GIT_PS1_SHOWDIRTYSTATE=true
export PS1='\[\033[1;32m\]\u@\h\[\033[00m\]:\[\033[1;34m\]\w\[\033[1;31m\]$(__git_ps1)\[\033[00m\]\$ '

~/.gitconfig の設定

[user]
    name = app2641
    email = app2641@gmail.com

[alias]
    ch = checkout
    ci = commit
    st = status
    nm = merge --no-ff
    br = branch

[color]
    ui = auto
    status = auto
    diff = auto
    branch = auto
    grep = auto

[core]
    editor = vi

[credential]
    helper = osxkeychain

[credential "https://github.com/app2641"]
    username = app2641

ChromeExtensions

Evernote Web Clipper
Go Extensions
Chrome to Phone
Google Quick Scroll
LinkOpenNewTab
HatebuContextMenu


だいたい環境整った。
実際はこんなにすんなりとはいかなくて色々試行錯誤したけどまあそこらへんは適当に対応出来ると思う。
PC 変えるのってめんどくさい。