If you see it

Live for passion

Setup New Mac Notes

Config new system when you switch to another mac(10.8.4)

1
2
3
$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"  
$ brew install wget  
$ brew install curl

Basic terminal setup

~/.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
" basic settings
set number
set hidden
set history=10000
set cursorline
hi CursorLine cterm=NONE ctermbg=lightblue ctermfg=darkyellow
set ruler
set cmdheight=2
set hlsearch
set tabstop=4
set shiftwidth=4
set softtabstop=4
set autoindent
set ignorecase smartcase
set showcmd
syntax on

iTerm2 theme : thayer iterm2 themes

~/.bash_profile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
##system cmd 
alias ll="ls -Gl"
alias lll="ls -Gla"

##terminal
export CLICOLOR=1
# \h:\W \u\$
export PS1='\[\033[01;33m\]\u@\h\[\033[01;31m\] (\W) \$ \[\033[00m\]'
# grep
alias grep='grep –color=always'

##Android
export ANDROID_HOME='/Users/LynneQ/Documents/sdks/adt-bundle-mac-x86_64-20130522/sdk'
export PATH=${PATH}:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/tools

##Customization
alias DocLL='cd /Users/LynneQ/Documents/blog/lynnequ.github.com'

##Git
alias gst='git status'
alias gba='git branch -a'
alias gb='git branch'
alias gsts='git status --short'
alias gco='git commit -m'
alias gad='git add'

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

Notes:

LynneQ:~ lqu$
Definition: machine name, colon, present working directory(~) a sapce, the current user and dollar sign($) (# if the shell has super user)
Ref

Install sublime text 2 app

After dmg package installation, to make it usable within terminal.

$ ln -s -F /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl

$ subl test.py
$ subl path/to/folder

Re-setup Octopress blog

  1. Copy the git repo to new location
  2. Go set up git credential
  3. To make rake generate/preview/deploy works
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$ sudo gem install bundler 
$ sudo gem update --system
$ sudo bundle install

Install rvm and upgrade ruby from 1.8.7 to 1.9.3
$ \curl -L https://get.rvm.io | bash  //Install rvm
$ source /Users/LynneQ/.rvm/scripts/rvm
$ rvm get stable
$ rvm requirements
$ rvm install 1.9.3
$ rvm list
$ ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]

$ rvm use --default 1.9.3
Using /Users/LynneQ/.rvm/gems/ruby-1.9.3-p429

$ ruby -v
ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-darwin12.4.0]

Unfornately, if you bundle install before upgrade to 1.9.3, you need to restart the shell, and do bundle install again.

Ref

Comments