node on ubuntu

instal node * install nvm curl https://raw.github.com/creationix/nvm/master/install.sh | sh * nvm install 0.10.26 ## latest version * copying whatever version of »

redis on ubuntu

* $ sudo apt-get install -y python-software-properties * $ sudo add-apt-repository -y ppa:rwky/redis * $ sudo apt-get update * $ sudo apt-get install -y redis-server source [http://tosbourn.com/2013/12/redis/ »

linux command 小手札

users * create users with home folder useradd -m <user> * add sudoer adduser <username> sudo must installed package * linux headers sudo apt-get install »

JSONP & CORS

這次剛好要使用到cross-domain request,在這邊記錄一下不同的方法。 大家都知道,因為same origin policy的關係,不能跨網域送request jsonp jsonp就是解決這個問題的一個方法,雖然request不能跨網域,不過img,script這些倒是可以,所以jsonp就是透過新增script到head裡,src指向送出的url,借此達成cross domain request 使用方法 * http method只能用GET * 在變數裡加上callback變數 http://example.com/users/ »

Namecheap & Mandrill: set up DNS record

add two records in sub-domain settings this is how it looks like: copy settings from Mandrill website [http://help.mandrill.com/entries/22030056-how-do-i-add-dns-records-for-my-sending-domains] , and paste to »