<?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:blogger='http://schemas.google.com/blogger/2008' 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>2024-09-05T05:24:25.901+08:00</updated><category term="unix"/><category term="linux"/><category term="programming"/><category term="note"/><category term="debian"/><category term="perl"/><category term="ruby"/><category term="command usage"/><category term="mood"/><category term="rails"/><category term="mac"/><category term="未完成"/><category term="emacs"/><category term="tool"/><category term="webdesign"/><category term="article"/><category term="bsd"/><category term="perl module"/><category term="python"/><category term="vim"/><category term="api"/><category term="css"/><category term="git"/><category term="github"/><category term="javascript"/><category term="photonics"/><category term="scheme"/><category term="shell"/><category term="tutorial"/><category term="webservice"/><category term="c"/><category term="framework"/><category term="plugin"/><category term="tips"/><category term="SOP"/><category term="algorithm"/><category term="cerebrate"/><category term="database"/><category term="deploy"/><category term="fdtd"/><category term="gnuplot"/><category term="homebrew"/><category term="info"/><category term="jifty"/><category term="jquery"/><category term="kernel"/><category term="ldap"/><category term="library"/><category term="movie"/><category term="mpb"/><category term="music"/><category term="mysql"/><category term="openbsd"/><category term="package"/><category term="perl6"/><category term="physics"/><category term="presentation"/><category term="quote"/><category term="robot"/><category term="svn"/><category term="twitter"/><category term="ubuntu"/><category term="zsh"/><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'/><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=26&amp;max-results=25'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03349665394793041301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>156</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-7848306293802570403</id><published>2013-06-06T01:31:00.002+08:00</published><updated>2013-06-06T02:42:24.020+08:00</updated><title type='text'>啟動 Mac OS X 的 OpenLDAP</title><summary type="text">三部曲
1. slappasswd 建立新的 rootpw
2. 編輯 /etc/openldap/slapd.conf 內的 suffix, rootdn, rootpw
3. slapd -d 255
Reference:
starting OpenLDAP on Mac OS X</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8142021398805582000/7848306293802570403' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/7848306293802570403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/7848306293802570403'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2013/06/mac-os-x-openldap.html' title='啟動 Mac OS X 的 OpenLDAP'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03349665394793041301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-1652186303673474760</id><published>2012-08-06T16:31:00.001+08:00</published><updated>2012-08-06T19:54:41.780+08:00</updated><title type='text'>LWP Chunked Way</title><summary type="text">
在讀取 || 傳送大量資料的時候，可以利用 IO::* 這類模組去一次讀取其中一段資料 (Chunk) 就寫入暫存檔 || 送出，來避免對記憶體造成負擔的手法可說相當常用。也是 HTTP Server 用來做 Streaming 或是 Long Polling / Comet 的基礎。



Client 端的用法就沒有那麼絢麗的名字了（開發 Client 的人沒有必要用絢麗的名字震懾老闆？:p）。LWP 對 Chunk 手法也有支援，不過在 GET 和 POST 兩種 HTTP 動做的支援方式分別使用了接受 callback 和利用全域變數啟用的方式，有點不一致，特此紀錄一筆。



GET 使用 Chunk 的方式在 lwpcook 有詳盡記載。在 LWP::UserAgent 物件呼叫 request 方法時多傳入一個 callback 即可。




POST 動作其實也應該</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8142021398805582000/1652186303673474760' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1652186303673474760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/1652186303673474760'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2012/08/lwp-chunked-way.html' title='LWP Chunked Way'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03349665394793041301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-357503808728001954</id><published>2012-03-31T18:56:00.007+08:00</published><updated>2012-03-31T20:16:57.773+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="perl"/><title type='text'>class variables in Moose</title><summary type="text">Moose attribute didn&#39;t allow the reference rather than a CODE reference as a default value. That prevents the objects shared a attribute when initializing. Actually this is a good design. But How should I do when needing a shared attribute between objects? I may refer this as the concept of class variable.The state variable in CODE reference may be competent with this role. A Counter as an </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8142021398805582000/357503808728001954' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/357503808728001954'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/357503808728001954'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2012/03/class-variables-in-moose.html' title='class variables in Moose'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03349665394793041301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-5397898409528274248</id><published>2012-03-03T03:27:00.003+08:00</published><updated>2012-03-03T14:17:08.898+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="perl"/><title type='text'>Mysterious Timestamp</title><summary type="text">時間轉換大概是最惱人的「小」問題之一，每個語言的標準處理方式不盡相同。Perl 的 localtime() 是月份從 0 開始到 11 結束，Ruby 的 DateTime 是月份是從 1 開始的，不過 Perl 的  DateTime 月份也從 1 開始 (LOL)。背誦這些東西大概會發瘋。不過 Epoch 沒有這個問題，任何語言上的 Epoch 應該都是一致的，有的只是時差問題，使用 Epoch 來初始時間物件大概是避開這問題的好方法之一，特別在不同語言間交換時間資料時，用 Epoch 交換後怎麼 format 都不會出問題。所以有些時間模組大概會像 Perl 的 DateTime 一樣實作 from_epoch() 這種 constructor。就這點設計而言，Badger::Timestamp 大概是最好用的時間模組，其 constructor 支援 DateTime 模組的方式</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8142021398805582000/5397898409528274248' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/5397898409528274248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8142021398805582000/posts/default/5397898409528274248'/><link rel='alternate' type='text/html' href='http://navyblueshellingford.blogspot.com/2012/03/mysterious-timestamp.html' title='Mysterious Timestamp'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03349665394793041301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8142021398805582000.post-3940210670082546020</id><published>2011-10-27T17:46:00.008+08:00</published><updated>2012-04-26T12:01:36.602+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="git"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><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/fullpage/post/8142021398805582000/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>Anonymous</name><uri>http://www.blogger.com/profile/03349665394793041301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></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="shell"/><category scheme="http://www.blogger.com/atom/ns#" term="unix"/><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/fullpage/post/8142021398805582000/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>Anonymous</name><uri>http://www.blogger.com/profile/03349665394793041301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></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="mac"/><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><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/fullpage/post/8142021398805582000/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>Anonymous</name><uri>http://www.blogger.com/profile/03349665394793041301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></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/fullpage/post/8142021398805582000/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>Anonymous</name><uri>http://www.blogger.com/profile/03349665394793041301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></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"/><category scheme="http://www.blogger.com/atom/ns#" term="perl module"/><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/fullpage/post/8142021398805582000/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>Anonymous</name><uri>http://www.blogger.com/profile/03349665394793041301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></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="emacs"/><category scheme="http://www.blogger.com/atom/ns#" term="info"/><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/fullpage/post/8142021398805582000/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>Anonymous</name><uri>http://www.blogger.com/profile/03349665394793041301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></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="unix"/><category scheme="http://www.blogger.com/atom/ns#" term="zsh"/><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&#39;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/fullpage/post/8142021398805582000/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>Anonymous</name><uri>http://www.blogger.com/profile/03349665394793041301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></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="emacs"/><category scheme="http://www.blogger.com/atom/ns#" term="mac"/><category scheme="http://www.blogger.com/atom/ns#" term="unix"/><title type='text'>Fullscreen Emacs on Mac OS X from tarball</title><summary type="text">Emacs 23.2 in trunk doesn&#39;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/fullpage/post/8142021398805582000/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>Anonymous</name><uri>http://www.blogger.com/profile/03349665394793041301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></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="python"/><category scheme="http://www.blogger.com/atom/ns#" term="tips"/><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/fullpage/post/8142021398805582000/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>Anonymous</name><uri>http://www.blogger.com/profile/03349665394793041301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></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/fullpage/post/8142021398805582000/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>Anonymous</name><uri>http://www.blogger.com/profile/03349665394793041301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></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/fullpage/post/8142021398805582000/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>Anonymous</name><uri>http://www.blogger.com/profile/03349665394793041301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></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="ldap"/><category scheme="http://www.blogger.com/atom/ns#" term="note"/><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/fullpage/post/8142021398805582000/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>Anonymous</name><uri>http://www.blogger.com/profile/03349665394793041301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></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="algorithm"/><category scheme="http://www.blogger.com/atom/ns#" term="fdtd"/><category scheme="http://www.blogger.com/atom/ns#" term="photonics"/><category scheme="http://www.blogger.com/atom/ns#" term="physics"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="tips"/><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&#39;t update field value of any point on the wall.That is to say, it could be written asSaving a few of computing resource.&amp;nbsp;</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8142021398805582000/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>Anonymous</name><uri>http://www.blogger.com/profile/03349665394793041301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></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="programming"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><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...:/&amp;nbsp;</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8142021398805582000/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>Anonymous</name><uri>http://www.blogger.com/profile/03349665394793041301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></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="c"/><category scheme="http://www.blogger.com/atom/ns#" term="programming"/><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/fullpage/post/8142021398805582000/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>Anonymous</name><uri>http://www.blogger.com/profile/03349665394793041301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></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="library"/><category scheme="http://www.blogger.com/atom/ns#" term="perl"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><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 </summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8142021398805582000/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>Anonymous</name><uri>http://www.blogger.com/profile/03349665394793041301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></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="perl"/><category scheme="http://www.blogger.com/atom/ns#" term="programming"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><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/fullpage/post/8142021398805582000/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>Anonymous</name><uri>http://www.blogger.com/profile/03349665394793041301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></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="perl"/><category scheme="http://www.blogger.com/atom/ns#" term="programming"/><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 &amp;lt;user&amp;gt; http://example.com/api/$ echo -n &quot;user:pass&quot; | openssl base64 -eand to &amp;nbsp;</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8142021398805582000/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>Anonymous</name><uri>http://www.blogger.com/profile/03349665394793041301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></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="api"/><category scheme="http://www.blogger.com/atom/ns#" term="programming"/><category scheme="http://www.blogger.com/atom/ns#" term="webservice"/><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.&amp;nbsp;</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8142021398805582000/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>Anonymous</name><uri>http://www.blogger.com/profile/03349665394793041301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></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&#39;t locate Git.pm in @INC</title><summary type="text">Well, the installation of Github::Import worked well on Linux boxs but always reported &quot;can&#39;t locate Git.pm in @INC&quot; 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.&amp;nbsp;</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8142021398805582000/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&#39;t locate Git.pm in @INC'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03349665394793041301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></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...&amp;nbsp;</summary><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8142021398805582000/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>Anonymous</name><uri>http://www.blogger.com/profile/03349665394793041301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>