<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8142021398805582000</id><updated>2011-11-28T09:10:13.565+08:00</updated><category term='ruby'/><category term='gnuplot'/><category term='mood'/><category term='jifty'/><category term='package'/><category term='javascript'/><category term='command usage'/><category term='perl'/><category term='robot'/><category term='quote'/><category term='cerebrate'/><category term='github'/><category term='info'/><category term='api'/><category term='presentation'/><category term='library'/><category term='fdtd'/><category term='ldap'/><category term='css'/><category term='photonics'/><category term='git'/><category term='python'/><category term='shell'/><category term='plugin'/><category term='tips'/><category term='rails'/><category term='debian'/><category term='physics'/><category term='vim'/><category term='perl module'/><category term='database'/><category term='deploy'/><category term='linux'/><category term='scheme'/><category term='openbsd'/><category term='emacs'/><category term='mysql'/><category term='tool'/><category term='note'/><category term='programming'/><category term='tutorial'/><category term='bsd'/><category term='webdesign'/><category term='SOP'/><category term='music'/><category term='未完成'/><category term='algorithm'/><category term='c'/><category term='webservice'/><category term='jquery'/><category term='movie'/><category term='homebrew'/><category term='unix'/><category term='twitter'/><category term='mac'/><category term='kernel'/><category term='zsh'/><category term='mpb'/><category term='article'/><category term='framework'/><category term='ubuntu'/><category term='perl6'/><category term='svn'/><title type='text'>shelling</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://navyblueshellingford.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default?start-index=101&amp;max-results=100'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>152</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-3940210670082546020</id><published>2011-10-27T17:46:00.008+08:00</published><updated>2011-10-28T00:44:42.327+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>meet git-p4</title><summary type='text'>For some reasons,  in recent works I have to use Perforce, the revision control system used by Perl core team before 2008. Unfortunately, perforce lacks of distributed features and leads to heavy branching. In this developing, these two problems often interrupted programmers with conflicts hardly to solve. Bad workflow design also makes members forget to check out before editing randomly. A git </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=3940210670082546020' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/3940210670082546020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/3940210670082546020'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2011/10/meet-git-p4.html' title='meet git-p4'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-8245275974120381974</id><published>2011-04-09T14:16:00.007+08:00</published><updated>2011-04-10T20:54:00.245+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Arrange bashrc</title><summary type='text'>A simple recursive function can have aid on arranging bashrc files in a clear structure.Add a line to source it in ~/.bashrc first, and then collect similar rc files into directories respectively.If a bunch of bash completions were put inside ~/.bash_completion/, like ~/.bash_completion|-- hg|-- git|   |-- git|   |-- gitk|   `-- git-common`-- svkjust one more line   load $HOME/.bash_completion </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=8245275974120381974' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/8245275974120381974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/8245275974120381974'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2011/04/arrange-bashrc.html' title='Arrange bashrc'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-3506953394818610306</id><published>2011-03-25T18:16:00.019+08:00</published><updated>2011-03-28T15:50:11.190+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='homebrew'/><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><title type='text'>MySQL 5.5.10 homebrew install issue</title><summary type='text'>Coming after the mysql 5.1.52 homebrew install issue, the just released mysql 5.5.10, which solved the previous problem, has another issue. When starting mysql daemon with mysql.server script, it showed error message likeERROR! The server quit without updating PID file (/usr/local/var/mysql/data/*********.pid). The new homebrew instruction to install mysql makes its default $datadir to be $</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=3506953394818610306' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/3506953394818610306'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/3506953394818610306'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2011/03/mysq-5510-homebrew-install-issue.html' title='MySQL 5.5.10 homebrew install issue'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-6756888363020939067</id><published>2010-11-30T21:04:00.008+08:00</published><updated>2010-11-30T21:37:51.709+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><category scheme='http://www.blogger.com/atom/ns#' term='perl6'/><title type='text'>Tasting Perl6</title><summary type='text'>At the moment that the first release of Rakudo Star has been announced over four months, binary packages or tested build in package managers have been provided in varieties of OS. If we want to taste Perl6 on Mac OS X, the best choice seems to be using Homebrew. Just type in $ brew install rakudo-star and run $ perl6. Rakudo Star in Homebrew has been updated to the newest version: 2010.10.On </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=6756888363020939067' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/6756888363020939067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/6756888363020939067'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2010/11/tasting-perl6.html' title='Tasting Perl6'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-1370231285678603338</id><published>2010-11-23T20:55:00.002+08:00</published><updated>2010-11-24T11:11:19.141+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='perl module'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Intro to App::CLI</title><summary type='text'>My first meet with App::CLI is in the summer of 2008, trying to write JiftyX::Fixtures. Without abundant PODs coming with this module, it took me almost one day to understand this module through trial and error. Since, I write this intro to reveal more power from this module; even I have contribute some code and DOCs to the project.Actually, App::CLI is a really powerful module having central </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=1370231285678603338' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1370231285678603338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1370231285678603338'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2010/11/intro-to-appcli.html' title='Intro to App::CLI'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-602929764709319518</id><published>2010-11-13T21:40:00.010+08:00</published><updated>2010-11-13T23:43:53.413+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='info'/><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><title type='text'>Keep favorite info pages in $HOME</title><summary type='text'>Info is a handy document system most emacs fans love. We can learn Info, Emacs Basics, Emacs Lisp, Magit and blah blah blah through the system and look up any detail every time we need without leaving Emacs, so that I install many info pages into /usr/local/info, /usr/share/info and /usr/share/local/info. However, when I need to migrate all data to new computer, keeping my info pages is really a </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=602929764709319518' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/602929764709319518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/602929764709319518'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2010/11/keep-favorite-info-pages-in-home.html' title='Keep favorite info pages in $HOME'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-7781371408484921395</id><published>2010-10-27T21:20:00.003+08:00</published><updated>2010-10-27T22:19:45.862+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='zsh'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>Two ZSH conventions for switchers from BASH</title><summary type='text'>When starting to learn UNIX, I enjoyed with the well-designed Debian 3.1 and the bash completions coming with it. At that time the ZSH on Debian wasn't well configured for a newbie having no direction in dark.Actually, the ZSH was set as a handy tool on recent releases of Debian-like system. For a longtime user of BASH, the default setting of backward-kill-word is confusing: it never stop with </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=7781371408484921395' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/7781371408484921395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/7781371408484921395'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2010/10/two-zsh-conventions-for-switchers-from.html' title='Two ZSH conventions for switchers from BASH'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-6057970039641602986</id><published>2010-10-23T15:03:00.005+08:00</published><updated>2010-10-23T23:49:28.987+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><title type='text'>Fullscreen Emacs on Mac OS X from tarball</title><summary type='text'>Emacs 23.2 in trunk doesn't support fullscreen on Mac OS X.Japanese hacker typester do a patch for this.Following is a quick step-by-step instruction to compile emacs 23.2 supporting fullscreen with this patch.cd /tmpwget http://ftp.twaren.net/Unix/GNU/gnu/emacs/emacs-23.2.tar.gzwget http://github.com/downloads/typester/emacs/feature-fullscreen.patchtar xzvf emacs-23.2.tar.gzcd emacs-23.2patch -</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=6057970039641602986' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/6057970039641602986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/6057970039641602986'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2010/10/fullscreen-emacs-on-mac-os-x-from.html' title='Fullscreen Emacs on Mac OS X from tarball'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-689848767783288238</id><published>2010-08-05T19:22:00.003+08:00</published><updated>2010-08-06T13:49:54.096+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>practical python trick about static variables</title><summary type='text'>It seems there is no syntax to declare static variables in Python. Fortunately, here is a useful trick to accomplish the goal.</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=689848767783288238' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/689848767783288238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/689848767783288238'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2010/08/practical-python-trick-about-static.html' title='practical python trick about static variables'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-1968564378552788505</id><published>2010-04-11T20:37:00.005+08:00</published><updated>2010-04-11T20:47:35.846+08:00</updated><title type='text'>sudo on OpenLDAP</title><summary type='text'>sudo 官方文件 和 這篇 SOP (on Ubuntu) 算是寫得最實用的文件。不過呢，還是很多廢話。這兩篇文章的內容可以總結如下：1. 準備好可以使用的 OpenLDAP 伺服器，這份文件 寫得比較詳盡。幫他加上 sudo.schema，並用 migration_sudo.pl 轉換並匯入 sudoers。2. 裝好支援 LDAP 的 sudo。Debian-like System 是 sudo-ldap 這個套件。3. /etc/nsswitch.conf 加上 sudoer: ldap4. /etc/ldap/ldap.conf 或是 /etc/sudo-ldap.conf (在 Debian 是同一檔案) 加上 sudoers_base [SUDOers DN]</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=1968564378552788505' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1968564378552788505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1968564378552788505'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2010/04/sudo-on-openldap.html' title='sudo on OpenLDAP'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-2846211545697390577</id><published>2010-03-27T22:11:00.009+08:00</published><updated>2011-04-21T23:27:20.823+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mood'/><title type='text'>Fun Weekend</title><summary type='text'>忙了一整個禮拜，今天又唸了一整天書，於是乎覺得需要休息一下，想起開學時就想去吃看看的鼎泰豐，到現在還不知道在哪，拎起夾克，挾住一本書在腋下就出發來去探探路。在 GMap 的帶路下，很快就到了信義路上的鼎泰豐飽餐一頓之後決定輕鬆地走路回宿舍。沿著金山南路往南走，走過熟悉又陌生的台師大門口。大三時因為擔心研究所筆試臨場反應不好，要是沒考上就得去盡忠報國，所以特別提前一年報了台大光電的筆試來試刀。走過那年的考場，兩年裡準備考試的酸甜苦辣倒也反芻了一遍。轉了個彎走進師大路，比對著記憶裡的街角，今晚的師大夜市一般的人潮洶湧。不一樣的是路邊的那個小廣場，今晚圍了一群人。湊上去一看，是個有趣的大叔，看起來快到不惑之年，一把小提琴流暢的拉著，一支音響丟在旁邊為他伴奏，不時還擺個花式娛樂大家一下。老實說看到的時候還滿驚訝的，台北街頭藝人不是沒有，但是大多是吉他或是歌唱表演。小提琴的表演呢，</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=2846211545697390577' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/2846211545697390577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/2846211545697390577'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2010/03/funny-weekend.html' title='Fun Weekend'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-5611833510247518431</id><published>2010-03-27T14:47:00.002+08:00</published><updated>2010-03-27T14:51:59.296+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='note'/><category scheme='http://www.blogger.com/atom/ns#' term='ldap'/><title type='text'>Common Abbreviation in LDAP</title><summary type='text'>DC: Domain CountryOU: Organization UnitCN: Common NameDN: Distinguish NameRDN: relative distinguish nameLDIF: LDAP Interchange FormatDIT: Directory Information Tree</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=5611833510247518431' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/5611833510247518431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/5611833510247518431'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2010/03/common-abbreviation-in-ldap.html' title='Common Abbreviation in LDAP'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-1822105958141784679</id><published>2010-02-01T19:07:00.004+08:00</published><updated>2010-02-01T19:28:47.352+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='photonics'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='algorithm'/><category scheme='http://www.blogger.com/atom/ns#' term='physics'/><category scheme='http://www.blogger.com/atom/ns#' term='fdtd'/><title type='text'>FDTD tips</title><summary type='text'>When using BPML, external wall should be treated as PECs for simplicity no matter how many the maximum sigma is. The best way to do that is setting initial field value on external wall to be zero, and then don't update field value of any point on the wall.That is to say, it could be written asSaving a few of computing resource. </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=1822105958141784679' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1822105958141784679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1822105958141784679'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2010/02/fdtd-tips.html' title='FDTD tips'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-8817370257345823642</id><published>2010-01-29T17:09:00.006+08:00</published><updated>2010-01-29T17:54:25.815+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Injecting one module into another in Python</title><summary type='text'>Here is a simple code snippet to do that. Saving it to an individual file and import it in other module to use it.Using exec statement is also good, but need to pass globals() or locals() dictionary to the function executing exec statement.Doing dirty things in Python is really not easy...:/ </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=8817370257345823642' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/8817370257345823642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/8817370257345823642'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2010/01/two-way-to-inject-one-module-into.html' title='Injecting one module into another in Python'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-8046764297682193555</id><published>2009-12-30T00:01:00.010+08:00</published><updated>2009-12-30T01:56:01.733+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='c'/><title type='text'>Assign initial value to a pointer</title><summary type='text'>Today I suddenly got an idea. Most of time when we use pointer, we create a variable, and assign initial value to it, and then take its address become the value of a new pointer for succeeding use. But we create a redundant identifier here.In fact, we could always create a fundamental type pointer and assign initial value to it through dereference operator like this snippet.and no redundant </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=8046764297682193555' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/8046764297682193555'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/8046764297682193555'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2009/12/assign-initial-value-to-pointer.html' title='Assign initial value to a pointer'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-757303651988162589</id><published>2009-11-13T23:36:00.013+08:00</published><updated>2009-11-14T01:17:40.145+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='library'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Library for Numerical Computing</title><summary type='text'>Briefly summarize some numerical library here. It looks there are too many useful tools. Either for parallel computing or for matrix, numerical calculating and plotting.PLOT:MatPlotLib: it seems to be the most awesome plotting tool among this listPGPlot: C library, also have binding in Perl, Python,RubyPLPlot: cross-platform plot library, also have binding in PerlScientific PythonMRPlotPARALLEL:</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=757303651988162589' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/757303651988162589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/757303651988162589'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2009/11/library-for-numerical-computing.html' title='Library for Numerical Computing'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-9167000869324644999</id><published>2009-08-30T22:45:00.003+08:00</published><updated>2009-08-30T23:28:36.865+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Discussion about anonymous function in Perl and Ruby</title><summary type='text'>Just for fun, tonight I write a methods invoking two anonymous functions to iterate a Range with specified condition in Ruby. It looks likeclass Range    def each_satisfy()    endendAnd I want to invoke it as(1..10).each_satisfy(condition_lambda, callback_lambda)(1..10).each_satsify { |n| ...condition statment... } do |n|    ...callback statement...endWhen I try to define its prototype asdef </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=9167000869324644999' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/9167000869324644999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/9167000869324644999'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2009/08/discussion-about-anonymous-function-in.html' title='Discussion about anonymous function in Perl and Ruby'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-4068314771344537610</id><published>2009-08-23T22:35:00.006+08:00</published><updated>2009-08-24T11:27:31.570+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='api'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><category scheme='http://www.blogger.com/atom/ns#' term='webdesign'/><title type='text'>LWP, cURL, OpenSSL and Posterous</title><summary type='text'>The fun of programming is there is always subtle mechanism in implementation. It costs time to discover but sometime is deserving. for example.$ curl --basic -u &lt;user&gt; http://example.com/api/$ echo -n "user:pass" | openssl base64 -eand to  </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=4068314771344537610' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/4068314771344537610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/4068314771344537610'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2009/08/lwp-curl-openssl-and-posterous.html' title='LWP, cURL, OpenSSL and Posterous'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-7553618526252741262</id><published>2009-08-17T23:48:00.005+08:00</published><updated>2009-08-20T19:27:47.102+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='webservice'/><category scheme='http://www.blogger.com/atom/ns#' term='api'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Posterous API in Perl</title><summary type='text'>Posterous.com is a new (micro)-blog mesh-up system.You can use it mesh up almost all your (micro)-blog. Post once, Publish Everywhere. And there is still many funny features.It looks pretty good, so I translated its API to Perl. You can get it from CPAN. Still work in progress, but would be productive soon. </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=7553618526252741262' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/7553618526252741262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/7553618526252741262'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2009/08/posterous-api-in-perl.html' title='Posterous API in Perl'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-386893438197368684</id><published>2009-08-15T23:43:00.005+08:00</published><updated>2009-08-16T01:10:08.741+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Can't locate Git.pm in @INC</title><summary type='text'>Well, the installation of Github::Import worked well on Linux boxs but always reported "can't locate Git.pm in @INC" on Macintosh boxs. It is just a little trick and the answer is here.Git.pm comes with git instead of being a part of CPAN. Building a copy of git-core or copying from other box solve it quickly. </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=386893438197368684' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/386893438197368684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/386893438197368684'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2009/08/cant-locate-gitpm-in-inc.html' title='Can&apos;t locate Git.pm in @INC'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-690938893762094417</id><published>2009-07-07T12:34:00.005+08:00</published><updated>2009-07-07T12:44:31.174+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mood'/><title type='text'>the roadmap of upgrowth</title><summary type='text'>和長輩們聊天總是很有趣的。即使那是一句老生常談，從長輩提攜的口吻中說出，依然受用。6/26 的謝師宴，和賴暎杰老師坐在一起，我是這麼問的：「研究遇到瓶頸時，是怎麼面對的。」「每天都多學會一件事，就不用擔心。」yep... </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=690938893762094417' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/690938893762094417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/690938893762094417'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2009/07/roadmap-of-upgrowth.html' title='the roadmap of upgrowth'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-6277271559442810430</id><published>2009-07-06T22:24:00.006+08:00</published><updated>2009-07-06T23:19:33.823+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='perl module'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Data::Model</title><summary type='text'>Data::Model is a new ORM created by yappo, Its usage style is similar to DataMapper and Jifty::DBI.Different from most famous equivalent, Data::Model handles multi-database. In order to do that, every model was appointed its database and table name in addition to its schema specification.Let's see a simple example:This is a simplest model in Data::Model, Only two DDL in it. The first, base_driver</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=6277271559442810430' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/6277271559442810430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/6277271559442810430'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2009/07/datamodel.html' title='Data::Model'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-3385659171861213944</id><published>2009-06-25T22:19:00.006+08:00</published><updated>2009-06-25T22:47:51.449+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><title type='text'>disable beep in emacs</title><summary type='text'>使用 Emacs 也有一段時間，在 Mac 的 GUI 環境下使用 touch panel 撥弄 emacs 的 scroll bar，總會有令人中斷思緒的嗶嗶聲。Emacs Wiki: AlarmBell 這頁把處理警告的設定方式寫的頗為清楚。要把警示聲換成視覺警示，可以寫成 (custom-set-variables '(visible-bell t))在 GNU Emacs，這樣預設是閃爍第一行或最後一行，端看 touch panel 是轉哪一邊，XEmacs 則是閃爍整個螢幕，要讓 XEmacs 僅閃爍一行，則要寫成(custom-set-variables '(visible-bell 'top-bottom))。完全關閉警告，可以設成(custom-set-variables '(ring-bell-function 'ignore))。ring-bell-function </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=3385659171861213944' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/3385659171861213944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/3385659171861213944'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2009/06/disable-beep-in-emacs.html' title='disable beep in emacs'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-6439405613116111062</id><published>2009-06-25T15:20:00.001+08:00</published><updated>2009-06-25T22:49:45.538+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>Connect to SQLServer(MSSQL) in php5 with FreeTDS</title><summary type='text'>In Debian It needs to $ aptitude install freetds-common php5-sybase Then add configuration about SQLServer to /etc/freetds/freetds.conf[ConfigName]    host = host_of_sql_server    port = port_of_sql_server    tds version = correct_version    client charset = use_utf8_as_betterAll thing done. </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=6439405613116111062' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/6439405613116111062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/6439405613116111062'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2009/05/connect-to-sqlservermssql-in-php5-with.html' title='Connect to SQLServer(MSSQL) in php5 with FreeTDS'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-5789920404031529056</id><published>2009-06-08T12:13:00.004+08:00</published><updated>2009-06-08T18:17:16.725+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='c'/><title type='text'>Pseudo-OO syntax in C</title><summary type='text'>總是會忘記的 syntax </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=5789920404031529056' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/5789920404031529056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/5789920404031529056'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2009/06/syntax.html' title='Pseudo-OO syntax in C'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-7938676923121856371</id><published>2009-04-28T19:25:00.005+08:00</published><updated>2009-04-28T19:35:00.140+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>some notes</title><summary type='text'>1. do find =&gt; rescue2. model operation more than 3 lines =&gt; define class method in model3. def current_user4. render_as_form5. more than one relation in one table6. composite primary key =&gt; hook </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=7938676923121856371' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/7938676923121856371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/7938676923121856371'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2009/04/some-notes.html' title='some notes'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-3490761602167664963</id><published>2009-04-07T23:49:00.021+08:00</published><updated>2009-04-14T23:44:50.852+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='perl module'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Class::Implant - No &amp;import() !</title><summary type='text'>Class::implant is a experimental little helper implemented when I developed Railsish with gugod. Manipulating mixin and inheritance outside package is its primary function, also with abilities to select methods which would import.Original idea is inspire by the purpose: we want to import whole Helper methods into Controller which the Helper is named after. And it is should not be left to </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=3490761602167664963' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/3490761602167664963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/3490761602167664963'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2009/04/classimplant-no.html' title='Class::Implant - No &amp;amp;import() !'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-7223901178856701402</id><published>2009-04-07T22:15:00.004+08:00</published><updated>2009-04-07T22:27:44.527+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>debian manpage-zh</title><summary type='text'>上次寫 C 的時候對 Debian 還沒有很熟，今天偶然查 manpages 時才注意到有中文的 standard C library manpages。真相如下：希望我沒有太後知後覺...XD </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=7223901178856701402' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/7223901178856701402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/7223901178856701402'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2009/04/debian-manpage-zh.html' title='debian manpage-zh'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_EItDiCrpGpY/SdtiTRdrQCI/AAAAAAAABOI/P0lHuMpHhlU/s72-c/manpage_zh_fopen.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-4276806729265788078</id><published>2009-03-25T18:35:00.013+08:00</published><updated>2009-03-26T01:00:09.815+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='bsd'/><title type='text'>Rails on FreeBSD 7.1</title><summary type='text'>Today I was first time trying to install rails on freebsd 7.1. Neither the ports version nor the gem file version, rails could not work, even only simply creating a new project. It returns message as following.    undefined method `camelize' for "app":StringI had try to reinstall ruby, rubygem, and try other version rails but a nonsense. And finally I forgot how did I discover it needs ruby-iconv</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=4276806729265788078' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/4276806729265788078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/4276806729265788078'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2009/03/rails-on-freebsd-71.html' title='Rails on FreeBSD 7.1'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-4904894049351117991</id><published>2009-03-14T21:04:00.002+08:00</published><updated>2009-03-14T21:07:09.412+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>REPL in Perl</title><summary type='text'>Read-Evaluate-Print Loop 在現代語言中非常常見，諸如 Scheme， Haskell， Ruby， 與 Python 都有內建，實際工作時是非常實用的工具，Perl 6 也即將內建 REPL Shell，Perl 5 則沒有。這幾天偶然想在 Perl 中使用 REPL，搜尋了一下，在 use.perl.org 得到 2007 年發表的這篇文章，介紹了四個以 Perl 5 實做的 REPL Shell，翻譯如下。Continue reading REPL in Perl. </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=4904894049351117991' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/4904894049351117991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/4904894049351117991'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2009/03/repl-in-perl.html' title='REPL in Perl'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-2069229702921391761</id><published>2009-03-02T23:31:00.006+08:00</published><updated>2009-03-02T23:42:04.711+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='command usage'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>two pragmatic commands</title><summary type='text'>$ cp /some/path/to/myfile{,.back} # cp-the-file$ mv filename.{old,new} # quickly-rename-a-file </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=2069229702921391761' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/2069229702921391761'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/2069229702921391761'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2009/03/two-pragmatic-command.html' title='two pragmatic commands'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-2412349222200865346</id><published>2009-01-16T22:35:00.004+08:00</published><updated>2009-01-30T19:59:50.900+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='note'/><title type='text'>day spec</title><summary type='text'>#!/usr/bin/env perluse warnings;use strict;$csg = CSG-&gt;new;$csg-&gt;FristPhaseNote({  date     =&gt; "2009/01/16",   location =&gt; "Lib, 5F, Column Q30",   prepare  =&gt; ["9:40~11:50", "13:30~14:00"],  end      =&gt; "17:10",});__END__ </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=2412349222200865346' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/2412349222200865346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/2412349222200865346'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2009/01/day-spec.html' title='day spec'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-3960519419533776363</id><published>2009-01-08T17:07:00.008+08:00</published><updated>2009-01-08T17:19:36.014+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='quote'/><title type='text'>摩羯座老公使用說明書</title><summary type='text'>hmmm 只能說很中肯 XDDD品名：摩羯座老公生產日期：摩羯月(12月22日——1月19日)，年份憑個人喜好。主要成分：奮鬥力51%，忠誠29%，正直13%，樸實木訥7%。主要功能：1、本產品能動性很強，可大量減少用戶勞作時間。2、能為用戶的生活、情感、物質提供穩定保障。3、能默默地儘量實現用戶需要。適用人群：適用於溫順嫻雅、勤儉節約的女性。注意事項：1、不要對該產品的浪漫因子抱有太多期望，不然失望的人一定是用戶。2、本品在運作時，請別隨意打擾。3、用戶在使用時，儘量少做錯事，否則要承受其冰冷外殼下的噪音騷擾。4、別強行把該產品推到熱鬧、繁雜的環境中去。5、請尊重本產品的勞作能力和對工作的偏愛。6、用戶如遇到無法解決的障礙時，請立即諮詢「科技紫微星座網」，以免搶修不及時，要到民政局申請繁雜的換貨手續。禁忌：太以自我為中心、缺乏家庭經營觀念、無法理解本品事業心的人，為拒絕往來戶；本品對於</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=3960519419533776363' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/3960519419533776363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/3960519419533776363'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2009/01/blog-post.html' title='摩羯座老公使用說明書'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-1266372675770842025</id><published>2009-01-03T20:37:00.006+08:00</published><updated>2009-01-03T20:46:34.511+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tool'/><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='github'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>GitHub Creator</title><summary type='text'>Install# cpan Git::Github::CreatorSetting in ~/.github_creator.ini[github]        login_page="https://github.com/login"        account=joe@example.com        password=foobar        remote_name=origin        debug=1Then, in local git repositorygithub_creator --name my-project --desc "an awesome thing"Arguments are optional in a Perl module with META.yml.GitHub Creator's repository and manual on </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=1266372675770842025' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1266372675770842025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1266372675770842025'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2009/01/github-creator.html' title='GitHub Creator'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-726116526899107093</id><published>2008-12-30T10:43:00.005+08:00</published><updated>2008-12-31T23:50:51.274+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='note'/><title type='text'>0d6d98</title><summary type='text'></summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=726116526899107093' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/726116526899107093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/726116526899107093'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/12/0d6d98.html' title='0d6d98'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_EItDiCrpGpY/SVmLK67cuZI/AAAAAAAABKM/JVe9fLJ7XGM/s72-c/Picture+3.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-1416070989392280129</id><published>2008-12-13T21:09:00.007+08:00</published><updated>2008-12-13T21:53:59.130+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='jquery'/><category scheme='http://www.blogger.com/atom/ns#' term='github'/><title type='text'>simple clone of GitHub Badge</title><summary type='text'>Thanks to jQuery, I just spend three hours to create GitHub Widget, a clone of GitHub Badge. The widget is put in the sidebar of this page.Compare with GitHub Badge, GitHub Widget is full written in jQuery, so that it is also compatible with IE. And the usage and html structure is full compatible with GitHub Badge.I host it here temporarily. Please feel free to use it. </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=1416070989392280129' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1416070989392280129'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1416070989392280129'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/12/simple-clone-of-github-badge.html' title='simple clone of GitHub Badge'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_EItDiCrpGpY/SUO8zNicigI/AAAAAAAABIY/zzCFSDBXU1o/s72-c/Picture+1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-7064462189176434699</id><published>2008-12-13T16:04:00.009+08:00</published><updated>2008-12-13T16:23:04.852+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='api'/><category scheme='http://www.blogger.com/atom/ns#' term='github'/><title type='text'>github api callback</title><summary type='text'>Not documented on Official GitHub API Guide, GitHub provide "callback" parameter to allow corss-site json accessing.Example in jQuery:&lt;script src='http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js' type="text/javascript"&gt;&lt;/script&gt;&lt;script&gt;function myFunction(data) {    // data is the json we would get}$.getScript("http://github.com/api/v1/json/username?callback=myFunction")&lt;/script&gt; </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=7064462189176434699' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/7064462189176434699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/7064462189176434699'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/12/github-api-callback.html' title='github api callback'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-375046303422053970</id><published>2008-12-13T11:39:00.002+08:00</published><updated>2008-12-13T11:42:09.514+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>hide blogger navigation bar</title><summary type='text'>memo:.Navbar {    visibility:hidden;    display: none;} </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=375046303422053970' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/375046303422053970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/375046303422053970'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/12/hide-blogger-navigation-bar.html' title='hide blogger navigation bar'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-379769204600328582</id><published>2008-12-05T20:20:00.017+08:00</published><updated>2008-12-13T22:17:34.735+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='photonics'/><category scheme='http://www.blogger.com/atom/ns#' term='presentation'/><title type='text'>OPT presentation</title><summary type='text'>Slide which was uploaded to slideshare.net: OPT PresentationView SlideShare presentation or Upload your own. (tags: photonics physics)PDF of submitted paper:http://sites.google.com/site/shelling/Home/archive/opt2008%5Brevisedrelease%5D.pdf?attredirects=0PDF version slide:http://sites.google.com/site/shelling/Home/archive/opt-presentation.pdf?attredirects=0 </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=379769204600328582' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/379769204600328582'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/379769204600328582'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/12/opt-presentation.html' title='OPT presentation'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-6296354568422899613</id><published>2008-11-06T19:34:00.009+08:00</published><updated>2008-11-07T11:43:09.134+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='perl module'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>perl work with growl</title><summary type='text'>Excerpt fromhttp://oreilly.com/catalog/9780596526740/toc.htmland http://search.cpan.org/~cnandor/Mac-Growl-0.67/lib/Mac/Growl.pmA quick method to post notification to Growl.#!/usr/bin/env perluse warnings;use strict;use Mac::Growl qw(:all);Mac::Growl::RegisterNotifications(      # register your application in Growl before posting.    # just one time enough.    'growlalert',   # app name    ['</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=6296354568422899613' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/6296354568422899613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/6296354568422899613'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/11/perl-work-with-growl.html' title='perl work with growl'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-6469425131776178152</id><published>2008-10-13T23:42:00.004+08:00</published><updated>2008-10-13T23:57:29.678+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='scheme'/><title type='text'>push in scheme</title><summary type='text'> 01 (define push 02   (lambda (element stack) 03     (append stack (cons element '())))) 04 05 (push 'd '(a b c))  ; =&gt; (a b c d)Though putting element before stack is a little weird XD. </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=6469425131776178152' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/6469425131776178152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/6469425131776178152'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/10/push-in-scheme.html' title='push in scheme'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-4442902275544133509</id><published>2008-09-17T22:35:00.005+08:00</published><updated>2008-10-13T23:50:40.729+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='photonics'/><category scheme='http://www.blogger.com/atom/ns#' term='mpb'/><category scheme='http://www.blogger.com/atom/ns#' term='scheme'/><title type='text'>tip in mpb</title><summary type='text'>Defect mode always appears around the number of super lattice cells, so set num-bands automatically is a better way if we do not confirm how big the supper lattice.e.g.(define-param supercell-x 5)(define-param supercell-y 11)(set! num-bands (+ 2 (* supercell-x supercell-y)))  </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=4442902275544133509' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/4442902275544133509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/4442902275544133509'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/09/tip-in-mpb.html' title='tip in mpb'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-2947050752314712401</id><published>2008-09-06T02:36:00.005+08:00</published><updated>2008-09-06T18:55:07.057+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='note'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><title type='text'>emacs.app</title><summary type='text'>the default color scheme looks more beautiful in emacs.app. :DFrom temp</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=2947050752314712401' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/2947050752314712401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/2947050752314712401'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/09/emacsapp.html' title='emacs.app'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/navyblueshellingford/SMJhbblxlNI/AAAAAAAAA4c/H60D2HUkFLk/s72-c/Picture%203.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-2682844532523341456</id><published>2008-09-03T01:42:00.001+08:00</published><updated>2008-09-03T01:44:42.258+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><title type='text'>expand tab</title><summary type='text'>emacs: (setq-default indent-tabs-mode nil)vim: set expandtabbut I could not find the setting in textmate :~ </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=2682844532523341456' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/2682844532523341456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/2682844532523341456'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/09/expand-tab.html' title='expand tab'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-8577804752150338721</id><published>2008-08-31T00:33:00.005+08:00</published><updated>2008-08-31T00:45:40.327+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Array.split</title><summary type='text'> 01 class Array 02     def split(part) 03         num = self.length/part.to_i 04         result = Array.new 05         for row in 0..(part-1) 06             result[row] = self[num*row...num*(row+1)] 07         end 08         result 09     end  10 end a = [1,2,3,4,5,6,7,8,9]a.split(3).inspect   # =&gt; [[1, 2, 3], [4, 5, 6], [7, 8, 9]] </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=8577804752150338721' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/8577804752150338721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/8577804752150338721'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/08/arraysplit.html' title='Array.split'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-2332422056819925614</id><published>2008-08-11T18:27:00.004+08:00</published><updated>2008-08-21T00:25:21.871+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='note'/><title type='text'>build source package in debian</title><summary type='text'>just for memoneed build-essential fakeroot$ apt-get build-dep package$ fakeroot apt-get source -b packagethen wait for compilation.$ dpkg -i packageso happy not messing with tarball </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=2332422056819925614' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/2332422056819925614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/2332422056819925614'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/08/build-source-package-in-debian.html' title='build source package in debian'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-3275644104556622350</id><published>2008-08-10T11:44:00.003+08:00</published><updated>2008-08-10T11:52:32.719+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='note'/><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><title type='text'>safari history search</title><summary type='text'>Using the shortcut Command-? for searching help to search history is a very good hacking. </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=3275644104556622350' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/3275644104556622350'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/3275644104556622350'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/08/safari-history-search.html' title='safari history search'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-6022161729131931904</id><published>2008-08-06T21:31:00.002+08:00</published><updated>2008-08-06T21:39:57.029+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='note'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>ls_color in bsd style</title><summary type='text'>for xterm-color, set in .profile    alias ls="ls -G"    export LSCOLORS="ExFxCxDxBxEGEDABAGACAD"make it more beautiful. </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=6022161729131931904' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/6022161729131931904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/6022161729131931904'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/08/lscolor-in-bsd-style.html' title='ls_color in bsd style'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-1296105944585168541</id><published>2008-08-03T00:08:00.006+08:00</published><updated>2008-08-04T00:35:23.976+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>set volume in max os x terminal</title><summary type='text'>Costing my much time to search, It seems no command for setting volume in Leopard. When I used AppleScript to do this, I didn't know why the executable file cause some problem in screen. But Ruby's applescript gem do this good. I saved below content as /usr/bin/volume, and then I could use $ volume [1-7 as volume] to set Leopard's Volume from remote. 01 #!/usr/bin/env ruby</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=1296105944585168541' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1296105944585168541'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1296105944585168541'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/08/set-volume-in-max-os-x-terminal.html' title='set volume in max os x terminal'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-5428188997975353807</id><published>2008-07-30T16:03:00.006+08:00</published><updated>2008-08-02T23:46:19.043+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gnuplot'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>basic gnuplot script</title><summary type='text'>for plotting band data generated by mit photonics band 01 set title "band of te mode" 02 set term png 03 set output "te.png" 04  05 plot \ 06     "te" using 2:7 title "band 1" with linespoints, \ 07     "te" using 2:8 title "band 2" with linespoints, \   08     "te" using 2:9 title "band 3" with linespoints, \ 09     "te" using 2:10 title "band 4" with linespoints, \ 10     "te" using 2:11 title </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=5428188997975353807' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/5428188997975353807'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/5428188997975353807'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/07/basic-gunplot-script.html' title='basic gnuplot script'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-1198799693277547184</id><published>2008-07-29T17:24:00.003+08:00</published><updated>2008-07-29T17:26:53.350+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='note'/><title type='text'>today's note</title><summary type='text'>Simplicity is the ultimate sophistication.-- Leonardo Da Vinci </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=1198799693277547184' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1198799693277547184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1198799693277547184'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/07/todays-note.html' title='today&apos;s note'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-3535650713837701537</id><published>2008-07-28T21:17:00.005+08:00</published><updated>2008-07-28T21:24:53.962+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>ruby readline</title><summary type='text'>loop do    line = Readline::readline("app shell&gt; ")    if line        Readline::HISTORY.push line        puts line    else        puts        break    endendThis is a the most basic usage.I want to find a way could act as irssi :/ </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=3535650713837701537' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/3535650713837701537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/3535650713837701537'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/07/ruby-readline.html' title='ruby readline'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-8134967522394709580</id><published>2008-07-18T23:07:00.005+08:00</published><updated>2008-07-19T18:09:43.972+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mood'/><category scheme='http://www.blogger.com/atom/ns#' term='article'/><title type='text'>欄</title><summary type='text'>多愁善感 淌 一點點青春歲月 落 一片片彷彿存在母體操縱的世界深深地難以自拔於沒有方向的原點燈火玲瓏處憑欄人獨倚何是回首時for A.L. </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=8134967522394709580' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/8134967522394709580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/8134967522394709580'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/07/blog-post_18.html' title='欄'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-8772717962424547021</id><published>2008-07-14T10:46:00.011+08:00</published><updated>2008-07-14T18:36:58.722+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mood'/><category scheme='http://www.blogger.com/atom/ns#' term='article'/><title type='text'>天守閣之徘</title><summary type='text'>當王牌已然從天而降剩下的也只剩下祈求上蒼天守閣的銅牆鐵壁阿且看我是否是那德川家康夜月,燈火,今夜亦瘋狂---謹致 A.L.(J) </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=8772717962424547021' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/8772717962424547021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/8772717962424547021'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/07/blog-post.html' title='天守閣之徘'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-8398370578301154970</id><published>2008-07-12T22:06:00.004+08:00</published><updated>2008-07-12T22:34:58.743+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>restful 與 form_for</title><summary type='text'>不可以在 /news/new 的 view 裡面寫 form_for @news ~"~ </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=8398370578301154970' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/8398370578301154970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/8398370578301154970'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/07/restful-controller.html' title='restful 與 form_for'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-5177004160876371116</id><published>2008-06-03T13:01:00.004+08:00</published><updated>2008-06-03T13:08:16.052+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>operate existed tables in rails</title><summary type='text'>Just need specify table name and primary key in Model. All attribution in tables will appear automatically.class ModelName &lt; ActiveRecord::Base    self.table_name = "table_name"    self.primary_key = "primary_key"end </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=5177004160876371116' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/5177004160876371116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/5177004160876371116'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/06/operate-existed-tables-in-rails.html' title='operate existed tables in rails'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-7897350310736497917</id><published>2008-05-24T16:28:00.006+08:00</published><updated>2008-05-24T16:50:40.633+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>tree implement in ruby</title><summary type='text'>Just for fun, but it work well. 01 #!/usr/bin/env ruby 02 #  03 #  04  05  06 def tree(dirname, indent = "  |") 07     puts dirname + "/" if indent == "  |" 08     dir = Dir.open dirname 09     for f in dir 10         if f == "." || f == ".." 11             next 12         elsif File.directory? dirname+"/"+f 13             puts indent + "-" + f + "/" 14             tree( dirname+"/"+f, indent+"  </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=7897350310736497917' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/7897350310736497917'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/7897350310736497917'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/05/tree-implement-in-ruby.html' title='tree implement in ruby'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-1198758848651084328</id><published>2008-05-23T15:29:00.008+08:00</published><updated>2008-05-23T20:17:15.956+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>closure tip</title><summary type='text'>closure is so fun.well design for meta programming.note 1: 01 #!/usr/bin/env ruby         02 03 class Hash 04     def find_all 05         temp_hash = {} 06         each {|key,value| temp_hash[key] = value if yield(key,value) } 07         temp_hash 08     end  09 end  10  11 square = { 0 =&gt; 0, 1 =&gt; 1, 2 =&gt; 4, 3 =&gt; 9 } 12  13 new = square.find_all { |key,value| key &gt; 1 } 14 puts new.inspectpass </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=1198758848651084328' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1198758848651084328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1198758848651084328'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/05/closure-is-so-fun.html' title='closure tip'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-5013032763665441007</id><published>2008-05-20T23:14:00.006+08:00</published><updated>2008-05-20T23:27:20.020+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>Mac OS X Terminal tip</title><summary type='text'>leopard terminal use xterm-color as default, but conflict with linux when ssh. The backspace act as delete(kill word at right not left). Mac OS hint provide a good solution, Copy /usr/share/terminfo/78/xterm-color on mac to ~/.terminfo/x/ on linux box. Not affect linux default setting. It saves my emacs in screen environment :D  </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=5013032763665441007' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/5013032763665441007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/5013032763665441007'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/05/mac-os-x-terminal-tip.html' title='Mac OS X Terminal tip'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-4392224761251406178</id><published>2008-05-17T00:56:00.006+08:00</published><updated>2008-05-18T11:21:38.404+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='scheme'/><title type='text'>sample scheme</title><summary type='text'>hello, world! here#!/usr/bin/guile -s!#(write "hello, world!")define function(define square (lambda (n) (* n n) ) )(write (square 3) ) ; output 9link1: The Scheme Programming Language 3/elink2: Scheme Tutorial  </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=4392224761251406178' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/4392224761251406178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/4392224761251406178'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/05/sample-scheme.html' title='sample scheme'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-988831246850356136</id><published>2008-05-13T23:57:00.000+08:00</published><updated>2008-05-14T22:58:22.460+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='note'/><title type='text'>shelling.idv.tw</title><summary type='text'>買了 shelling.idv.tw，不過什麼都還沒配置 :D</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=988831246850356136' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/988831246850356136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/988831246850356136'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/05/shellingidvtw.html' title='shelling.idv.tw'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-2487003873265365466</id><published>2008-05-12T22:08:00.005+08:00</published><updated>2008-05-13T16:07:48.534+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>self.pm</title><summary type='text'>some convenient usage I prefer. :ppackage PackageName;use self;use strict;my @args;sub new {    @args = args;    for (@args) {        blah~!    }    bless {}, self;}1;self.pm++  </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=2487003873265365466' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/2487003873265365466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/2487003873265365466'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/05/selfpm.html' title='self.pm'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-1141403619526790271</id><published>2008-05-12T21:57:00.000+08:00</published><updated>2008-05-12T22:08:11.237+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='note'/><title type='text'>some vim</title><summary type='text'>something is fun from learning the vi editor 6/e:    dwelp change two words    xp change two alphabets</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=1141403619526790271' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1141403619526790271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1141403619526790271'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/04/some-vim.html' title='some vim'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-8644571365603016863</id><published>2008-05-04T18:50:00.003+08:00</published><updated>2008-05-04T18:58:45.616+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mood'/><category scheme='http://www.blogger.com/atom/ns#' term='note'/><title type='text'>內灣出遊微記</title><summary type='text'>昨日帶友人繞過大半個新竹，一直以來都不喜新竹風物，常感食衣住行皆不盡人意，即便與大學同學出遊也甚感無聊，但昨日與友人暢遊內灣，吃盡美食，甚感愉快。看來在一個地方生活是否能讓人滿意，最重要的仍然是人。</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=8644571365603016863' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/8644571365603016863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/8644571365603016863'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/05/blog-post.html' title='內灣出遊微記'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-6295190890560787338</id><published>2008-04-26T10:59:00.006+08:00</published><updated>2008-04-26T17:47:03.988+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='note'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>learning perl review ch2</title><summary type='text'>scalar:    1.233, 2E-3, 3e45        # exponential float    123_123_234        # integer with underscore    0377, 0xff, 0b1111        # octal =&gt; 0, hexadecimal =&gt; 0x, binary =&gt; 0b    "hello,"."world!"        # concatenate with .    "hello" x 3        # repeat 3 time with x    "20fred" * 3        # ignore string when transform    $str = $str . "blah";  ===  $str .= "blah";    $int = $int ** 3;  ===</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=6295190890560787338' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/6295190890560787338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/6295190890560787338'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/04/learning-perl-review-ch2.html' title='learning perl review ch2'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-4763831605725020072</id><published>2008-04-25T20:29:00.005+08:00</published><updated>2008-04-25T20:50:37.488+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>boring comparison</title><summary type='text'>show complex data structure in perl and rubyperl#!/usr/bin/env perluse warnings;use Data::Dumper;$a = ["a", "b", "c", { "key" =&gt; "value" } ];print Dumper $a;ruby#!/usr/bin/env rubya = ["a", "b", "c", { "key" =&gt; "value" } ]puts a.inspect  </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=4763831605725020072' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/4763831605725020072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/4763831605725020072'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/04/boring-comparison.html' title='boring comparison'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-8570186470295406129</id><published>2008-04-19T19:04:00.003+08:00</published><updated>2008-04-19T19:07:58.308+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>has_many() function note</title><summary type='text'>if has_many :orderorder.delete_all just set foreign key nullorder.destroy_all clear all sub record  </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=8570186470295406129' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/8570186470295406129'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/8570186470295406129'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/04/hasmany-function-note.html' title='has_many() function note'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-7629715927991832819</id><published>2008-04-18T18:08:00.005+08:00</published><updated>2008-04-18T18:25:58.434+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='deploy'/><category scheme='http://www.blogger.com/atom/ns#' term='webservice'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><title type='text'>apache2 and mongrel cluster on debian</title><summary type='text'>Enable apache2 proxy $ sudo a2enmod proxy proxy_http proxy_balancerConfigure Proxy in a virtual host/etc/apache2/site-enabled/default addDocumentRoot "RailsApp/public"     # even only RailsApp also workProxyPass / balancer://localhost/ProxyPassReverse / balancer://localhost/&lt; proxy balancer://localhost/ &gt;    BalanceMember http://localhost:3000    BalanceMember http://localhost:3001    </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=7629715927991832819' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/7629715927991832819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/7629715927991832819'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/04/apache2-and-mongrel-cluster-on-debian.html' title='apache2 and mongrel cluster on debian'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-3049238775982285591</id><published>2008-04-17T13:52:00.010+08:00</published><updated>2008-04-18T16:12:38.114+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>rss feed in rails</title><summary type='text'>Note for the Way to create Atom and RSS 2.0 feed.$ ./script/generate controller feedSuppose that the model we want show in feed is Postclass FeedController &lt; ApplicationController    def rss        @rss = @@post    end    def atom        @atom = @@post    end  private    @@post = Post.find :all,        :order =&gt; "update_at", :limit =&gt; 10endThen write the view.app/view/feed/rss.rxml 01 </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=3049238775982285591' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/3049238775982285591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/3049238775982285591'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/04/rss-feed-in-rails.html' title='rss feed in rails'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-5495003867205971668</id><published>2008-04-15T23:25:00.006+08:00</published><updated>2008-04-15T23:49:07.414+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>rails helper block</title><summary type='text'>Write for memo.To set a helper in the form&lt;% helper_name do %&gt;    &lt;div&gt;blah&lt;/div&gt;&lt;% end %&gt;. The definition is def helper_name(&amp;block)    content = capture(&amp;block)    concat("what we want write before block".block.binding)    concat(content,block.binding)    concat("what we want write after block",block.binding)endBy the way, partial is the way do the same thing once. if the outer html is used </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=5495003867205971668' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/5495003867205971668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/5495003867205971668'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/04/rails-helper-block.html' title='rails helper block'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-1696266474757787758</id><published>2008-04-13T21:11:00.008+08:00</published><updated>2008-04-13T21:46:21.168+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><title type='text'>spakit</title><summary type='text'>The rails plugin spakit means Single Page Application KIT. It can transform rails app into single page app but not modify app structure in large scale by loading content of other controller into primary controller.The installation step is from handlino.com$ sudo gem install spakit$ cd railsapp/vendor/plugins/$ gem unpack spakit$ mv spakit-version spakitnow installation finished.Before using it, </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=1696266474757787758' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1696266474757787758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1696266474757787758'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/04/spakit.html' title='spakit'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-6466673476314395063</id><published>2008-04-13T10:37:00.002+08:00</published><updated>2008-04-13T10:49:10.717+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='webdesign'/><title type='text'>annotate models</title><summary type='text'>The plugin used for adding column annotate into model file is introduced in Ralls Bible. Write for note. the newer introduction at http://pragdave.pragprog.com/pragdave/2006/02/annotate_models.html. Just two step to use it. 1.script/plugin install http://repo.pragprog.com/svn/Public/plugins/annotate_models2. rake annotate_modelsAnd all model now with column annotate at file head.</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=6466673476314395063' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/6466673476314395063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/6466673476314395063'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/04/annotate-models.html' title='annotate models'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-3629467605382329814</id><published>2008-04-05T20:06:00.002+08:00</published><updated>2008-04-05T20:13:23.843+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='note'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><title type='text'>.bashrc and screen on leopard</title><summary type='text'>Leopard does not put .bashrc in user home directory as default. It is not convenient when using screen because screen only load ~/.bashrc but not /etc/bashrc. So copy the latter as my .bashrc.</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=3629467605382329814' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/3629467605382329814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/3629467605382329814'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/04/bashrc-and-screen-on-leopard.html' title='.bashrc and screen on leopard'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-3221082111711117320</id><published>2008-04-05T11:18:00.003+08:00</published><updated>2008-04-05T11:25:06.111+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='command usage'/><title type='text'>debian package hyperlink</title><summary type='text'>If writing &lt;a href=”apt:package_name”&gt;package_name&lt;/a&gt; in html, On click the hyperlink, debian will install it.</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=3221082111711117320' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/3221082111711117320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/3221082111711117320'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/04/debian-package-hyperlink.html' title='debian package hyperlink'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-1726992643602941351</id><published>2008-04-05T00:20:00.004+08:00</published><updated>2008-04-05T00:28:24.275+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='webservice'/><category scheme='http://www.blogger.com/atom/ns#' term='note'/><title type='text'>openid resource</title><summary type='text'>Report by solidot.org: openid resource. Noticeable point is blogger.com is one of the openid provider. It is a little surprising to me.</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=1726992643602941351' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1726992643602941351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1726992643602941351'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/04/openid-resource.html' title='openid resource'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-7623538834161967083</id><published>2008-03-31T17:03:00.003+08:00</published><updated>2008-07-19T01:36:22.866+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mood'/><category scheme='http://www.blogger.com/atom/ns#' term='note'/><title type='text'>the rain</title><summary type='text'>in my heart, in my heart...the hopeon the cloud, on the cloud...the dreamfar away, far away...the tomorrowsing the same, sing the same... </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=7623538834161967083' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/7623538834161967083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/7623538834161967083'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/03/rain.html' title='the rain'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-8292577482678153345</id><published>2008-03-25T23:29:00.003+08:00</published><updated>2008-03-25T23:42:17.752+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tool'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='command usage'/><title type='text'>.sqliterc</title><summary type='text'>I never notice that sqlite3 also support rc file. Write all convenient setting you like as ".header on"...etc in it. and never set it again when using sqlite3.</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=8292577482678153345' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/8292577482678153345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/8292577482678153345'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/03/sqliterc.html' title='.sqliterc'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-4365352702927319850</id><published>2008-03-16T20:15:00.002+08:00</published><updated>2008-03-16T20:24:51.086+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='command usage'/><title type='text'>the date you installed system</title><summary type='text'>There is no specific log for the date you installed system. But two way to know it from other log. The one is find out the system installer log record what happened when the system be installed. in Debian, sudo head /var/log/installer/syslog could show the date. The second is find out the time the root partition be created. Suppose root partition is /dev/hda1, sudo tune2fs -l /dev/hda1 | grep </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=4365352702927319850' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/4365352702927319850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/4365352702927319850'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/03/date-you-installed-system.html' title='the date you installed system'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-1434004706236707833</id><published>2008-03-15T19:32:00.005+08:00</published><updated>2008-03-15T19:49:44.115+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='command usage'/><title type='text'>sample yafc</title><summary type='text'>yafc is very like lftp, but some different. yafc support Kerberos4, and it own better command interface more near unix command. for example, get -r could get a directory form remote, rm -r could remove directory from remote. But lftp support script input for using lftp -f script. The ability doesn't exist in yafc. Another ability more easy to use in yafc is customizing interface. It also work </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=1434004706236707833' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1434004706236707833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1434004706236707833'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/03/sample-yafc.html' title='sample yafc'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-8699950046218249533</id><published>2008-03-15T18:50:00.003+08:00</published><updated>2008-03-15T19:50:25.343+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='command usage'/><title type='text'>sample cftp</title><summary type='text'>cftp is a full-screen console based ftp/sftp client, very easy to use for new user shift from windows need window based ftp client. But it is still need user understand some vi short key. Anyway, It still very helpful for new shift user. Just type in cftp -u username hostname to connect destination server. and use H, J, K, L could move within every directory. It is not famous in my friends maybe </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=8699950046218249533' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/8699950046218249533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/8699950046218249533'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/03/sample-cftp.html' title='sample cftp'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-7674464099535037783</id><published>2008-03-09T22:17:00.004+08:00</published><updated>2008-03-09T22:25:14.081+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tool'/><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><title type='text'>tip for using space</title><summary type='text'>It is very boring that using F8 to show all space partition and drag the window into another partition. Tonight the little discovery make me so happy. I just need to drag the window to the edge of desktop and double click the space key, and the window shift into the other partition beside the edge. Mac OS X is always make me amazing everyday. :D</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=7674464099535037783' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/7674464099535037783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/7674464099535037783'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/03/tip-for-using-space.html' title='tip for using space'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-1989549223767328961</id><published>2008-03-02T23:27:00.004+08:00</published><updated>2008-03-02T23:38:18.084+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='note'/><category scheme='http://www.blogger.com/atom/ns#' term='article'/><title type='text'>Taiwan High Speed Rail</title><summary type='text'>Because of no motor transport ticket on sale, Today I am forced to take High Speed Rail when coming from Taipei. So that I eventually know the spelling of its name....so intuitive spelling. :p</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=1989549223767328961' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1989549223767328961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1989549223767328961'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/03/taiwan-high-speed-rail.html' title='Taiwan High Speed Rail'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-5636686567656906920</id><published>2008-02-29T19:46:00.005+08:00</published><updated>2008-03-01T00:48:07.475+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='command usage'/><title type='text'>colordiff and vim</title><summary type='text'>Here mention a perl script package on Debian, colordiff. For highlighting output of diff just only pipe the output of diff to colordiff. For example, $ diff -rq /etc /var | colordiff | less -R or other similar commands as $svk diff | colordiff | less -R to get the highlighted. Otherwise we can use vim to got the same effect if syntax on has set in .vimrc. For example, $diff -rq /etc /var | vim -.</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=5636686567656906920' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/5636686567656906920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/5636686567656906920'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/02/colordiff-and-vim.html' title='colordiff and vim'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-4431129555031158899</id><published>2008-02-27T12:10:00.003+08:00</published><updated>2008-02-27T12:16:15.989+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='webdesign'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>Blueprint CSS 0.6 problem on IE</title><summary type='text'>the class name "container" in IE have a problem: not align itself at center. Someway to fix it is set its parent element a property: { text-align: center; }  to fix the problem.</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=4431129555031158899' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/4431129555031158899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/4431129555031158899'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/02/blueprint-css-06-problem-on-ie.html' title='Blueprint CSS 0.6 problem on IE'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-5020415269232243359</id><published>2008-02-24T18:55:00.006+08:00</published><updated>2008-02-24T19:22:22.704+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SOP'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>CPAN mirror SOP</title><summary type='text'>3 steps note for how to mirror CPAN for fast installation in organization:First, using rsync mirror whole CPAN to local machine. Write rsync -avHP --delete rsync.nic.funet.fi::CPAN /var/www/CPAN &gt;&gt; /var/log/rsync.log 2&gt;&amp;1 into crontab for daily synchronization. This step supposes mirror site root is put at /var/www/CPAN.Second, write apache VirtualHost as below.&lt;VirtualHost *&gt;        ServerName </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=5020415269232243359' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/5020415269232243359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/5020415269232243359'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/02/cpan-mirror-sop.html' title='CPAN mirror SOP'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-6082883040155397449</id><published>2008-02-23T20:09:00.005+08:00</published><updated>2008-02-23T21:33:03.904+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='framework'/><category scheme='http://www.blogger.com/atom/ns#' term='note'/><category scheme='http://www.blogger.com/atom/ns#' term='webdesign'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>Blueprint CSS 0.7.1 release</title><summary type='text'>Quickly NoteThere is many new feature in new release.New class name include alt, incr, quiet, small, large, showgrid...etc. Conversely, class name "column" is removed. Now div tag should be used as column. New directory structure come with new compressing ability through ruby script. Button's style move out from plugin and become an alone package put on download page</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=6082883040155397449' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/6082883040155397449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/6082883040155397449'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/02/blueprint-css-071-release.html' title='Blueprint CSS 0.7.1 release'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-6516795731359916747</id><published>2008-02-23T18:32:00.012+08:00</published><updated>2008-02-23T21:38:36.019+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tool'/><category scheme='http://www.blogger.com/atom/ns#' term='note'/><category scheme='http://www.blogger.com/atom/ns#' term='webdesign'/><title type='text'>browser debuger note</title><summary type='text'>Note for memory...Safari:Safari include a build-in debug menu, but default is off. To enable debug menu, command "defaults write com.apple.Safari IncludeDebugMenu 1" in shell, restart Safari to load it.Debug menu with a javascript console. use Firebug compatible function console.log and console.info can print some infomation in itRegretfully, build-in javascript console is not with javascript </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=6516795731359916747' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/6516795731359916747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/6516795731359916747'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/02/browser-debuger-note.html' title='browser debuger note'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-5431011582119375396</id><published>2008-02-17T15:09:00.005+08:00</published><updated>2008-03-15T19:53:23.091+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='tool'/><category scheme='http://www.blogger.com/atom/ns#' term='robot'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>the end of winter recess</title><summary type='text'>這個寒假比預期的廢了很多，預定的事項，想讀的書，沒一件做完的，再來，三月一日就是研究所考試了，看著別人即將踏入考場，自己摸著鼻子甸甸自己剩下不到一年的時間儲備，真是難以說話。雖然沒有完成預定的事項，不過練習 perl/ruby 之餘還是寫了些 bot，cwbbot 是個簡單的 ruby 天氣預報機器人，提供他 twitter 的帳號和密碼，丟進 crontab，就可以每天自動取得明日溫度。</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=5431011582119375396' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/5431011582119375396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/5431011582119375396'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/02/blog-post.html' title='the end of winter recess'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-1373154294070669885</id><published>2008-02-16T16:44:00.004+08:00</published><updated>2008-02-16T16:58:22.917+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='command usage'/><category scheme='http://www.blogger.com/atom/ns#' term='twitter'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>perl 和 ruby 的 twitter shell</title><summary type='text'>twitter 最近紅透半邊天，perl 和 ruby 都有了 twitter api，現在還有 twitter shell，perl 的 twitter shell 利用 cpan 下 install Twitter::Shell 就可以得到 /usr/local/bin/twittershell， 使用方式為新增一個 yaml，如： touch ~/.twittershell.yml ， 裡面填入username: yourtwitteraccountpassword: yourtwitterpassword在 shell 下 twittershell -c ~/.twittershell.yml 就進入該 shell， help 可以得到幫助。ruby 版本內建在 twitter 這個 gem 內， sudo gem install twitter 就可以得到 /usr/bin/</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=1373154294070669885' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1373154294070669885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1373154294070669885'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/02/perl-ruby-twitter-shell.html' title='perl 和 ruby 的 twitter shell'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-6678229433719834157</id><published>2008-02-15T21:15:00.005+08:00</published><updated>2008-03-09T22:31:54.128+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>land mine in file name extension of ruby</title><summary type='text'>和 perl 不同, ruby 的 third party module package, 也就是 gems, 副檔名和一般 script 都一樣是 ".rb", ruby 搜尋 module 的 path 似乎又包含了 ".", 所以如果使用的 script 檔名和 script 引用的 gems 內的檔名相同的話, 就會衝突 :/</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=6678229433719834157' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/6678229433719834157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/6678229433719834157'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/02/ruby.html' title='land mine in file name extension of ruby'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-7540695840414983872</id><published>2008-02-10T15:29:00.000+08:00</published><updated>2008-02-10T15:55:53.481+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>vim tab 功能</title><summary type='text'>今天逛 Cornelius 時偶然發現  Vim tab 的功能，是 7.0 開始加入的新功能，使用感覺相當方便，基本用法如下：:tabe filename 在新標籤頁打開一個檔案:tabc 關閉標籤頁:tabo 關閉其他標籤頁:tabn 下一個標籤頁 或是 gt, C-PageDown:tabp 上一個標籤頁 或是 gT, C-PageUp:tabr 第一個標籤頁:tabl 最後一個標籤頁:tabs 顯示所有標籤頁:tabm [N] 移動到第N順位還可以 :set tabline 來定義 tab 顯示方式</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=7540695840414983872' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/7540695840414983872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/7540695840414983872'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/02/vim-tab.html' title='vim tab 功能'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-2274852318202347300</id><published>2008-02-07T21:01:00.000+08:00</published><updated>2008-02-07T21:20:22.033+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='command usage'/><title type='text'>dos2unix</title><summary type='text'>因為有個 js 檔是從 windows 上來的，要更換換行字尾，遍尋不到 dos2unix，這裡寫到和我一樣的遭遇，google 排名還滿前面，看來許多人都有同樣需求？需要的套件是 sysutils。</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=2274852318202347300' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/2274852318202347300'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/2274852318202347300'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/02/dos2unix.html' title='dos2unix'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-4413868130826599162</id><published>2008-01-06T12:10:00.000+08:00</published><updated>2008-02-24T19:16:30.317+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='command usage'/><title type='text'>aptitude tutorial</title><summary type='text'>aptitude 是 sarge 之後建議的套件管理器， etch 之後應該是預設的，同時支援指令介面和文字 cursor 介面，是基於 apt-get 的模式發展的，我想他是想解決 apt 相關指令太過繁瑣的問題吧，另外也加上了自動解除不被相依套件的功能，以及 mutt-like 正規式搜尋的支援，後者還頗為重要，我想這是使 .deb 系統領先 .rpm 系統的關鍵(註：yum 管理器可以支援 shell 的 pattern 查詢，apt-cache 不支援任何 pattern)，他也相容 dselect，可以說把 debian 之前的所有套件管理方式都包含進來，使用 aptitude 也一段時間了，不過最近才弄清楚他的特性。Review首先，回顧一下 apt 套件管理器運作的方法，這在 aptitude 中也是一樣的，利用 /etc/apt/source.list 內指定的套件庫來源</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=4413868130826599162' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/4413868130826599162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/4413868130826599162'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/01/aptitude-tutorial.html' title='aptitude tutorial'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-5946196223528230855</id><published>2008-01-05T02:07:00.000+08:00</published><updated>2008-01-05T03:33:28.643+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>debian 上的 apache2 manual</title><summary type='text'>適才偶然發現了 debian 上的一個 apache 小秘密，還頗有趣的。事實上，debian 上的軟體很多都有提供 xxx-doc 這樣的文件套件，安裝位置都在 /usr/share/doc/ 底下，apache2 也不例外，預設上 /etc/apache2/site-available/default 這個 site configure file 是有 alias /doc /usr/share/doc 這樣的配置，所以雖然我有裝了apache2-doc，一直以來我也都是連到 http://mymachine/doc/ 來看的。不過 apache2-doc 提供的 html doc 就是特別奇怪，連結都連結不好，所以我都會重新配置檔案，copy 一份 en 的到特定資料夾，這樣才會比較正常。但沒想到這份文件其實提供了一個 configure 在 /etc/apache/conf.d/</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=5946196223528230855' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/5946196223528230855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/5946196223528230855'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2008/01/debian-apache2-manual.html' title='debian 上的 apache2 manual'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-6076458162896897791</id><published>2007-12-29T18:40:00.000+08:00</published><updated>2008-02-15T21:22:29.953+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>gem update on debian</title><summary type='text'>日前升級了 debian 上的 gem，隨即發生無法使用的狀況，檢查之後發現，debian 內建的 rubygems 套件安裝位置在 /var/lib/gems/，而gem 原生的安裝位置在 /usr/lib/ruby/gems/，因此升級後會發生找不到正確 gems 的狀況。因為 gems 的目錄配置方式不符合 FHS，debian 在 3.x 就一直遲遲不發佈 rubygems 套件，即使目前 4.x 發佈了，在目錄的相容性上問題也很多。目前看來要安裝 gems 又不用通過官方安裝包條件的最好方法就是，先安裝內建的 rubygems，執行 gem update --system 之後，會得到一個 /usr/bin/gem1.8，然後移除 rubygems 和 libgems-ruby1.8，最後將 /usr/bin/gem1.8 重新命名成 /usr/bin/gem，就可以得到原生的</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=6076458162896897791' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/6076458162896897791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/6076458162896897791'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2007/12/gem-update-on-debian.html' title='gem update on debian'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-4321203244472334729</id><published>2007-12-23T20:25:00.000+08:00</published><updated>2008-02-15T21:21:54.221+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='framework'/><category scheme='http://www.blogger.com/atom/ns#' term='jifty'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>jifty screencast</title><summary type='text'>今天發現一個還不錯的 jifty 教學影片，位在http://www.crium.univ-metz.fr/docs/devel/jifty/screencast.html感覺上和 rails demo movie 差不多，晚點再來看看，不然 CPAN 上的 tutorial 實在不是我小小弱者看得懂的阿XD。OS: CPAN 上的 tutorial 連基本的 MVC 架構都沒解釋清楚，實在也太把大家都當作強者了 Orz...</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=4321203244472334729' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/4321203244472334729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/4321203244472334729'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2007/12/jifty-screencast.html' title='jifty screencast'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-2437793708439147505</id><published>2007-12-06T00:27:00.000+08:00</published><updated>2008-02-15T21:22:17.296+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>CGI::UploadEasy</title><summary type='text'>今天研究了一下 CGI::UploadEasy 模組，這是 CGI 上傳模組中最簡單的一個，只要在網頁內設定好上傳檔案用的 input 欄位，然後最後加上一行my $upload = CGI::UploadEasy-&gt;new(-uploaddir=&gt;"上傳資料夾",-maxsize=&gt;"負數視為不設限，單位為KB",-tempdir=&gt;"暫存資料夾");這樣會自動判斷有多少個檔案要上傳，還有上傳檔案的 mime-type，最後可以用 $upload 物件內的方法來取得上傳檔案的參數。不過這個模組不是很適合我目前希望的方式，他能夠指定的參數只有目錄，中文也有問題，另外兩個 CGI::Upload 和 CGI::Uploader 模組則是功能太複雜了，過兩天有時間的話自己動手作一個上傳模組好了。</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=2437793708439147505' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/2437793708439147505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/2437793708439147505'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2007/12/cgiuploadeasy.html' title='CGI::UploadEasy'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-8315468734331699221</id><published>2007-11-27T16:51:00.000+08:00</published><updated>2008-02-15T21:22:29.954+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>example ruby</title><summary type='text'>今天在我的 Debian 上面裝了 ruby 來嚐鮮，感覺相當有趣，就如同作者所希望的 ruby 這顆紅寶石給人輕快簡單的感覺，相較於 perl 這個穩重的珍珠，各有所擅。要建制一個 Rail application 的環境需要下的指令有sudo aptitude install ruby ri rdoc irb rubygem這還會自動安裝 libreadline 等等 lib其中ri 可以用來查詢 moduleirb 是 interactive rubyrubygem 是 ruby 的  package management framework，安裝完後有 gem 指令可用rdoc 可以用來生成 doc然後再下sudo gem install rails --include-dependencies就可安裝 Rails，不過還未包含 Mongrel 伺服器，等等再研究須不需要現在安裝</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=8315468734331699221' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/8315468734331699221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/8315468734331699221'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2007/11/example-ruby.html' title='example ruby'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-7785866585102944438</id><published>2007-11-20T23:52:00.000+08:00</published><updated>2008-01-10T22:26:28.515+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='note'/><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><title type='text'>blind spot of leopard</title><summary type='text'>用了 leopard 之後一直找不到如何用 tab 跳躍到 button 上的選項，終於還是在這裡發現了，看起來似乎是個 UI 的盲點阿 XD</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=7785866585102944438' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/7785866585102944438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/7785866585102944438'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2007/11/leopard-tab-button-ui-xd.html' title='blind spot of leopard'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-1727691734705558478</id><published>2007-11-20T15:55:00.000+08:00</published><updated>2007-11-20T16:09:29.179+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mood'/><category scheme='http://www.blogger.com/atom/ns#' term='note'/><title type='text'>期中考</title><summary type='text'>期中考終於告一段落了，在繼續這樣考下去我實在會撐不住，這種沒意義的活動要持續到什麼時候呢，看了 Hacker &amp; Painter 之後真的覺得人生從七歲到二十一歲的現在，自己和周遭的人都在不斷進行這種奇怪的活動，老師和學生都只是互相應付而已，但是卻沒人肯真正面對事實，高喊教改的蠢豬們真的應該試著去讓教育產出可以創造出財富的人，而不是讓大家輕鬆學習，輕鬆學習又不代表快樂，要輕鬆的話作弊就可以了，何必要教改呢？不是嗎？不過雖說告一段落，下星期還有電路學，下下星期還有電磁學，看來又跟上學期一樣，到學期末都不會有停止的一天了，我只能說，這不是我要的生活阿，大學生不是應該學習如何去創造或欣賞美好的事物嗎？失去了本身最值得驕傲的文化和大腦的創意，在怎麼會寫考卷也不值得驕傲吧？歷史上從來未曾聽說過考試可以讓一門學問興盛繁榮，倒是看了不少美麗的中文文體和學科因為考試制度的介入而跨入學問演化的死胡同。</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8142021398805582000&amp;postID=1727691734705558478' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1727691734705558478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1727691734705558478'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2007/11/blog-post_20.html' title='期中考'/><author><name>shelling ford</name><uri>https://profiles.google.com/113634082684193579669</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-gvLbTWmTMaQ/AAAAAAAAAAI/AAAAAAAABwY/AWTckRa2vLU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>
