Install Cocoapods in OSX 10.8

Upgrade MacPorts First installed the latest XCode via the Mac App Store Install latest XCode command line tools via Xcode (install xcode tools) $ sudo port -d selfupdate $ sudo port upgrade outdated Install Ruby Version Manager(RVM) & latest Ruby

Installing Xcode Command Line Tools

To install the necessary Xcode tools using Xcode on the Mac: Start Xcode on the Mac. Choose Preferences from the Xcode menu. In the General panel, click Downloads. On the Downloads window, choose the Components tab. Click the Install button next to Command Line Tools.      

linux kill process by name

find process id with name: pgrep [processname]kill process by name: kill `pgrep [processname]`

mysql 創建使用者+權限

1. 新增使用者: mysql > create user 'UserName'@'Host' identified by 'Password';2. 給予權限: mysql > grant OPTION on TARGET to USER;3. 刪除使用者: mysql > drop user OPTION 'UserName'@'Host';註: 1. UserName 為使用者名稱,例如 root , joey , jackey ...,請注意,要加單引號(') 2. Password 為密碼,請注意,要加單引號(')Example: 1. 新增使用者:

Django + apache + mysql

安裝python 安裝資料庫(mysql-server) 安裝python-mysqldb (如果使用其它資料庫則使用python-xxxxx) 安裝apache2 安裝Django 有兩個方法到 https://www.djangoproject.com/download 下載最新官方版本Django-1.3.tar.gztar xzvf Django-1.3.tar.gzcd Django-1.3sudo python setup.py install 或下指令 svn co http://code.djangoproject.com/svn/django/trunk/ 最新開發板本接下來安裝 libapache-mod_python (讓 apache能執行python)