2011年5月24日

python on Centos 5

最近幫自己的舊筆電(x24)灌回了Centos 5, 其python還停留在2.4.
為了要能夠用app engine, python要2.5以上.
最後使用的方法是到python.org下載2.7 source code,
confgure
make
make altinstall
就可以並存了, 預設安裝的目錄會跟原本系統內的不同, 於/usr/local/bin/python2.7
接下來需要利用alternatives指令來修改預設的python執行檔-->/usr/bin/python
格式: alternatives  [options]  --install  link  name  path  priority
將原本的2.4和新的2.7都建入alternatives的資料庫中
alternatives --install /usr/bin/python python /usr/bin/python2.4 200
alternatives --install /usr/bin/python python /usr/local/bin/python2.7 400
由於數字大者優先權高, 所以python2.7會被選取囉

2011年5月23日

permisson for sshfs

sshfs, 只要對方的電腦有sshd, 就可以直接將目錄直接mount上來,不像nfs還要做其它設定。
安裝完fuse套件後,記得到/etc/group裡的fuse群組加入自己的帳號, 這樣才可以用自已的帳號, 否則會出現錯誤訊息:fuse: failed to exec fusermount: Permission denied
改完後必需要重新登入才會生效。 

2011年5月6日

Add Apture Highlights to Blogger

Edit your blogger html and add the following javascript to the end of BODY part:
<script id="aptureScript">
(function (){var a=document.createElement("script");a.defer="true";
a.src="http://www.apture.com/js/apture.js?siteToken=vsJttrn";
document.getElementsByTagName("head")[0].appendChild(a);})();
</script> 
 

2011年5月3日

change msys rxvt default font

Edit the msys.bat, find the line calling rxvt:
start %WD%rxvt -backspacekey -sl 2500 -fg %FGCOLOR% -bg %BGCOLOR% -sr -fn Courier-12 -tn msys -geometry 80x25 -e /bin/sh --login -i
Change the default font Courier to other font name.
start %WD%rxvt -backspacekey -sl 2500 -fg %FGCOLOR% -bg %BGCOLOR% -sr -fn Consolas-14 -tn msys -geometry 80x25 -e /bin/bash --login -i

coap-client 4.3.0 Windows build

coap-client  is a  wget -like tool to generate simple requests for retrieval and modification of resources on a remote server.  Got the sour...