<?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-4245136694152797021</id><updated>2026-07-11T07:18:01.656+08:00</updated><category term="Linux"/><category term="程式應用"/><category term="Apple"/><category term="Ubuntu"/><category term="VirtualBox"/><category term="Git"/><category term="科技"/><category term="LINE"/><category term="BOT"/><category term="Bottender"/><category term="Fedora"/><category term="PPS"/><category term="SVN"/><category term="Web"/><category term="Wiki"/><category term="iOS"/><category term="iTunes"/><category term="porting"/><category term="snmp"/><category term="生活筆記"/><category term="聊天"/><title type='text'>雨弦的小宇宙</title><subtitle type='html'>我的小宇宙要爆發啦 \囧/</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://rainstingtw.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://rainstingtw.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Rainstring</name><uri>http://www.blogger.com/profile/18331666332301272398</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>60</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4245136694152797021.post-4106668861289212369</id><published>2018-07-18T17:44:00.000+08:00</published><updated>2018-07-18T17:44:29.729+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BOT"/><category scheme="http://www.blogger.com/atom/ns#" term="Bottender"/><category scheme="http://www.blogger.com/atom/ns#" term="Git"/><category scheme="http://www.blogger.com/atom/ns#" term="LINE"/><title type='text'>[Bottender] 如何在 Heroku 上部屬 LINE BOT</title><content type='html'>上一篇文章是 2015 了呢....&lt;br /&gt;
主要是之前已經寫過一個簡單的 LINE BOT，&lt;br /&gt;
但最近剛好有點時間(?)，所以想要藉此機會全部重寫。&lt;br /&gt;
&lt;br /&gt;
之前寫的機器人原始碼在這邊&lt;br /&gt;
&lt;a href=&quot;https://github.com/Rainsting/TarotLineBot&quot; target=&quot;_blank&quot;&gt;https://github.com/Rainsting/TarotLineBot&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
---------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
這次我選擇由台灣人自己新開發的機器人框架 - Bottender，&lt;br /&gt;
在此時的版本是 v0.15.0。&lt;br /&gt;
&lt;br /&gt;
由於這整包在中文圈內的討論似乎不多，大部分都是拿來用在 FB Messenger 上，&lt;br /&gt;
對於 LINE BOT &amp;amp; Heroku 的著墨很少，希望藉由這一篇簡單做個記錄。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. 首先申請個 LINE@ 帳號，並開啟 developer 功能：&lt;br /&gt;
&lt;br /&gt;
網路上其實很多資訊了，這邊就不多說，建議可以參考前人的文章：&lt;br /&gt;
&lt;br /&gt;
LINE BOT 實戰 ( 原理篇 ) &lt;br /&gt;
&lt;a href=&quot;http://www.oxxostudio.tw/articles/201701/line-bot.html&quot; target=&quot;_blank&quot;&gt;http://www.oxxostudio.tw/articles/201701/line-bot.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
這邊目的是取得 Channel secret &amp;amp; Channel access token，之後會用到。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. 申請 Heroku 帳號，並安裝 Heroku CLI：&lt;br /&gt;
&lt;br /&gt;
一開始用免費帳號就足夠了，申請帳號也可參考前人的教學：&lt;br /&gt;
&lt;br /&gt;
Heroku安裝使用教學&lt;br /&gt;
&lt;a href=&quot;https://ericjhang.github.io/archives/689940fd.html&quot; target=&quot;_blank&quot;&gt;https://ericjhang.github.io/archives/689940fd.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. 將 Heroku 產生的 Domain 連結到 Line Develop Console 的 Webhook URL 內&lt;br /&gt;
&lt;br /&gt;
位置在 Heroku 的 Settings，複製底下 Domains and certificates 的後面那一段，&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. 安裝 bottender (以 Windows 為例)&lt;br /&gt;
&lt;br /&gt;
首先按照官網步驟，使用 npm 安裝 bottender 套件&lt;br /&gt;
&lt;a href=&quot;https://bottender.js.org/docs/GettingStarted&quot; target=&quot;_blank&quot;&gt;https://bottender.js.org/docs/GettingStarted&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;codeblock prettyprint&quot;&gt;npm install -g bottender
&lt;/pre&gt;&lt;br /&gt;
先自己取個好聽的名字，之後在過程中&lt;br /&gt;
&lt;br /&gt;
1. platform 選擇 &quot;line&quot;&lt;br /&gt;
2. store session 選擇 &quot;memory&quot;&lt;br /&gt;
3. server 選擇 &quot;express&quot;&lt;br /&gt;
&lt;br /&gt;
接著就會在當下目錄中看到我們剛剛新增的專案了。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. 編輯 package.json，並告訴 Heroku 我們需要用的 node 引擎版本&lt;br /&gt;
&lt;br /&gt;
由於我們會用到 async function，因此需要在環境內跟 Heroku 說我們要用的版本是什麼，編輯文件並加入以下內容：&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;codeblock prettyprint&quot;&gt;&quot;engines&quot;: {
    &quot;node&quot;: &quot;&amp;gt;= 7.6.0&quot;
  }
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
6. 編輯 bottender.config.js，加入自己的 LINE accessToken &amp;amp; channelSecret&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. 編輯 index.js，修改程式碼&lt;br /&gt;
&lt;br /&gt;
由於 heroku 不支援 server 監聽固定 port，因此我們需要把原先 server 應該要監聽的 port 透過 PORT 環境變數傳進去讓 server 知道，所以需要將原先的 server.listen 修改成這樣 &lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;codeblock prettyprint&quot;&gt;server.listen((process.env.PORT || 5000), () =&amp;gt; {
  console.log(&#39;server is running on 5000 port...&#39;);
});
&lt;/pre&gt;&lt;br /&gt;
這樣 Heroku 在組建 APP 時才不會發生 APP crash &amp;amp; Error R10 (Boot timeout) issue。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. 同樣編輯 index.js，修改程式碼&lt;br /&gt;
&lt;br /&gt;
因為 context.sendText 預設是用 push API，因此我們在這邊可以改成 replyText，或是在 new LineBot 內調整內容，讓他預設用 reply (after v0.15.0)&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;codeblock prettyprint&quot;&gt;const bot = new LineBot({
  accessToken: config.accessToken,
  channelSecret: config.channelSecret,
  sendMethod: &#39;reply&#39;, // Default: &#39;push&#39;
});
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
9. 在 Heroku 上建立新的 Git repository&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;codeblock prettyprint&quot;&gt;heroku login

cd my-project/
git init
heroku git:remote -a (Heroku APP Name)
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
10. 將修改內容 push 到 Heroku 上，部屬 BOT&lt;br /&gt;
&lt;br /&gt;
以後如果有任何更動，要更新程式，那底下就重新再做一遍&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;codeblock prettyprint&quot;&gt;git add .
git commit -am &quot;(要養成寫 LOG 的好習慣)&quot;
git push heroku master
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
之後如果要看 Log，可以隨時在 Heroku CLI 內即時觀看&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;codeblock prettyprint&quot;&gt;heroku logs --tail
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ref:&lt;br /&gt;
來寫個氣象機器人吧！&lt;br /&gt;
&lt;a href=&quot;https://blog.techbridge.cc/2018/05/10/lets-build-weather-bot-1/&quot; target=&quot;_blank&quot;&gt;https://blog.techbridge.cc/2018/05/10/lets-build-weather-bot-1/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
line bot 教學&lt;br /&gt;
&lt;a href=&quot;https://ericjhang.github.io/archives/c7f31b57.html&quot; target=&quot;_blank&quot;&gt;https://ericjhang.github.io/archives/c7f31b57.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Bottender Getting Started&lt;br /&gt;
&lt;a href=&quot;https://bottender.js.org/docs/GettingStarted&quot; target=&quot;_blank&quot;&gt;https://bottender.js.org/docs/GettingStarted&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Bottender Github&lt;br /&gt;
&lt;a href=&quot;https://github.com/Yoctol/bottender&quot; target=&quot;_blank&quot;&gt;https://github.com/Yoctol/bottender&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
--&lt;br /&gt;
&lt;strike&gt;嗚嗚我只有 PC，要是有人能贊助我 MAC 就 (ry&lt;/strike&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://rainstingtw.blogspot.com/feeds/4106668861289212369/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://rainstingtw.blogspot.com/2018/07/how-to-use-bottender-with-heroku-line-bot.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/4106668861289212369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/4106668861289212369'/><link rel='alternate' type='text/html' href='http://rainstingtw.blogspot.com/2018/07/how-to-use-bottender-with-heroku-line-bot.html' title='[Bottender] 如何在 Heroku 上部屬 LINE BOT'/><author><name>Rainstring</name><uri>http://www.blogger.com/profile/18331666332301272398</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-4245136694152797021.post-3856559400973519381</id><published>2015-08-13T11:56:00.001+08:00</published><updated>2015-08-13T11:56:26.178+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apple"/><category scheme="http://www.blogger.com/atom/ns#" term="iTunes"/><title type='text'>[iOS] 徹底刪除新版 iTunes 下載項目列表 -- 適用 v12 以上版本</title><content type='html'>過往只要開啟 iTunes 就會幫你自動下載從以前到現在抓過的所有 APPs，&lt;br&gt;
&lt;br&gt;
當時如果嫌麻煩還可以一次全選進而刪除掉，&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
但是！西嘎洗！在新版 iTunes v12.X 版之後，沒辦法一次全選刪除了怎麼辦？&lt;br&gt;
&lt;br&gt;
難道只能用笨方法慢慢刪除了嗎？&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://rainstingtw.blogspot.com/2015/08/how-to-delete-itunes-downloads.html#more&quot;&gt;閱讀更多 »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://rainstingtw.blogspot.com/feeds/3856559400973519381/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://rainstingtw.blogspot.com/2015/08/how-to-delete-itunes-downloads.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/3856559400973519381'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/3856559400973519381'/><link rel='alternate' type='text/html' href='http://rainstingtw.blogspot.com/2015/08/how-to-delete-itunes-downloads.html' title='[iOS] 徹底刪除新版 iTunes 下載項目列表 -- 適用 v12 以上版本'/><author><name>Rainstring</name><uri>http://www.blogger.com/profile/18331666332301272398</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-4245136694152797021.post-3792734209659707822</id><published>2014-11-04T15:22:00.001+08:00</published><updated>2014-11-04T15:22:11.067+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="LINE"/><category scheme="http://www.blogger.com/atom/ns#" term="科技"/><title type='text'>[iOS] 解除 LINE 的電話號碼綁定，與備份資料庫</title><content type='html'>由於 LINE 在綁定了電話號碼之後，就不能使用 VPN 跨國下載其他有趣的貼圖了，&lt;br /&gt;
但現在又有很多當地的新圖需要綁定電話號碼才可下載，如果想要解除綁定的話怎麼辦呢？&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
不管用什麼方法，更新過後的 LINE 都要重新下載貼圖喔！&lt;br /&gt;
而且要記得原本的換機密碼喔！&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 方法一 ==&lt;br /&gt;
我個人比較愛用這個方法 XD&lt;br /&gt;
&lt;br /&gt;
=== 解除綁定 ===&lt;br /&gt;
0. 在綁定狀態下，先下載好你要的貼圖。&lt;br /&gt;
1. 將 iPhone 連接到電腦，並打開你的 iTools / iFunBox （解除綁定開始）（這裡以 iTools 為例）。&lt;br /&gt;
2. 選取本機應用程式 LINE -- 瀏覽 -- 進入 Library -- Preferences 資料夾。&lt;br /&gt;
3. 「備份」並「刪除」 &quot;jp.naver.line.plist&quot; 檔案（記得一定要備份，丟到電腦的桌面也可以）。&lt;br /&gt;
4. 將 LINE 從 iOS 的多工列關閉，並重新打開，然後重新登入。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 重新登入 ===&lt;br /&gt;
5. 登入 -- 透過 Email 來登入並輸入換機密碼。&lt;br /&gt;
6. 然後在設定 -- 個人資料內，就可以看到電話號碼已經刪除囉。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 方法二 ==&lt;br /&gt;
首先用 iTools 備份聊天與對話記錄：&lt;br /&gt;
&lt;br /&gt;
1. 進入 LINE -- Documents 資料夾。&lt;br /&gt;
2. 備份裡面的「talk.sqlite」、「talk.sqlite-shm」、「talk.sqlite-wal」三個檔案&lt;br /&gt;
3. 刪除 LINE 並重新安裝，然後登入。&lt;br /&gt;
4. 安裝好後，將上述三個檔案重新丟進去原目錄即可。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enjoy it!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://rainstingtw.blogspot.com/feeds/3792734209659707822/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://rainstingtw.blogspot.com/2014/11/How-to-disable-phone-number-Line.html#comment-form' title='2 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/3792734209659707822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/3792734209659707822'/><link rel='alternate' type='text/html' href='http://rainstingtw.blogspot.com/2014/11/How-to-disable-phone-number-Line.html' title='[iOS] 解除 LINE 的電話號碼綁定，與備份資料庫'/><author><name>Rainstring</name><uri>http://www.blogger.com/profile/18331666332301272398</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-4245136694152797021.post-3785165925969734028</id><published>2014-10-28T17:14:00.000+08:00</published><updated>2014-10-28T17:14:35.637+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="程式應用"/><title type='text'>如何在 rename() 過後持續使用 inotify 來監控文件？</title><content type='html'>由於工作上遇到此問題，請教了咕狗大神半天也找不太到合適的答案，只好自己研究了。&lt;br&gt;
&lt;br&gt;
平常使用 inotify() 可以拿來監控文件的變更，最常見的就是透過 IN_CLOSE_WRITE 這個 mask 來監視，範例如下：&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://rainstingtw.blogspot.com/2014/10/how-to-add-inotify-after-rename-file.html#more&quot;&gt;閱讀更多 »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://rainstingtw.blogspot.com/feeds/3785165925969734028/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://rainstingtw.blogspot.com/2014/10/how-to-add-inotify-after-rename-file.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/3785165925969734028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/3785165925969734028'/><link rel='alternate' type='text/html' href='http://rainstingtw.blogspot.com/2014/10/how-to-add-inotify-after-rename-file.html' title='如何在 rename() 過後持續使用 inotify 來監控文件？'/><author><name>Rainstring</name><uri>http://www.blogger.com/profile/18331666332301272398</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-4245136694152797021.post-6619739982513316767</id><published>2014-08-26T17:52:00.001+08:00</published><updated>2014-08-26T17:52:05.627+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="程式應用"/><title type='text'>如何在 Linux Kernel 下偵測網路的連線狀態？</title><content type='html'>借用一下參考資料的標題。&lt;br /&gt;
&lt;br /&gt;
今天如果想要在 Linux Kernel 內得知實體網路的 Link Status，只需要去&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;/sys/class/net/
&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
然後直接去 cat 這兩個 node，以 eth0 來當範例。&lt;br /&gt;
&lt;br /&gt;
這是網路線有插入的狀況：&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;eth0/carrier:1
eth0/operstate:unknown
&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
這是網路線拔除的狀況：&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;eth0/carrier:0
eth0/operstate:down
&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
當再次插入時，原本的 carrier 會從 unknown 變成 1：&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;eth0/operstate:up
eth0/carrier:1
&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
不然直接去 grep eth0/ 底下的東西也可以：&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;grep &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&quot;&lt;/span&gt; eth0/* 
&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
很遺憾的是，在 user level 內支援的 inotify，在 kernel level 是不能用的，&lt;br /&gt;
所以要借助 socket 的力量，直接在 ethernet driver 內使用 sock_create_kern 來 create socket，&lt;br /&gt;
然後透過 connect 與 sock_sendmsg 將要傳的資料填寫在 buf 內就好。（如果要傳 struct 就 &amp;amp;struct）&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
參考資料：&lt;br /&gt;
&lt;a href=&quot;http://stackoverflow.com/questions/808560/how-to-detect-the-physical-connected-state-of-a-network-cable-connector&quot; target=&quot;_blank&quot;&gt;http://stackoverflow.com/questions/808560/how-to-detect-the-physical-connected-state-of-a-network-cable-connector&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://stackoverflow.com/questions/10340145/get-event-for-nic-ethernet-card-link-status-on-linux&quot;&gt;http://stackoverflow.com/questions/10340145/get-event-for-nic-ethernet-card-link-status-on-linux&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://rainstingtw.blogspot.com/feeds/6619739982513316767/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://rainstingtw.blogspot.com/2014/08/how-to-detect-ethernet-connected-state.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/6619739982513316767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/6619739982513316767'/><link rel='alternate' type='text/html' href='http://rainstingtw.blogspot.com/2014/08/how-to-detect-ethernet-connected-state.html' title='如何在 Linux Kernel 下偵測網路的連線狀態？'/><author><name>Rainstring</name><uri>http://www.blogger.com/profile/18331666332301272398</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-4245136694152797021.post-4364063891903806533</id><published>2014-07-22T18:24:00.002+08:00</published><updated>2014-07-22T18:24:26.608+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="porting"/><category scheme="http://www.blogger.com/atom/ns#" term="snmp"/><category scheme="http://www.blogger.com/atom/ns#" term="程式應用"/><title type='text'>Net-Snmp 5.7.2.1 Porting and Testing Commands</title><content type='html'>由於工作需求...呃應該不用什麼前言了。&lt;br&gt;
&lt;br&gt;
本篇主要介紹如何將 net-snmp 5.7.2.1 (LTS) 做完 CROSS-Compile&lt;br&gt;
並 Porting 到 Embedded 平台上。&lt;br&gt;
&lt;br&gt;
以下將以 Ti 的 DM368 平台來做示範。&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://rainstingtw.blogspot.com/2014/07/net-snmp-5.7.2.1-porting-and-testing-commands.html#more&quot;&gt;閱讀更多 »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://rainstingtw.blogspot.com/feeds/4364063891903806533/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://rainstingtw.blogspot.com/2014/07/net-snmp-5.7.2.1-porting-and-testing-commands.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/4364063891903806533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/4364063891903806533'/><link rel='alternate' type='text/html' href='http://rainstingtw.blogspot.com/2014/07/net-snmp-5.7.2.1-porting-and-testing-commands.html' title='Net-Snmp 5.7.2.1 Porting and Testing Commands'/><author><name>Rainstring</name><uri>http://www.blogger.com/profile/18331666332301272398</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-4245136694152797021.post-8470919256018115125</id><published>2014-06-16T14:50:00.001+08:00</published><updated>2014-06-16T15:52:50.156+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="Wiki"/><title type='text'>在 Ubuntu Server 上安裝自己的 WikiMedia</title><content type='html'>由於在工作上有需求（遠目），需要安裝 Wiki 在 Server 上，&lt;br /&gt;
這邊便簡單記錄一下在 Ubuntu 上安裝 Wiki - MediaWiki 的心路歷程。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
系統環境：&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;1. Ubuntu 14.04 server
2. MediaWiki 1.19.14
3. VirtualBox 4.3.12
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
確保安裝相關套件：&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;sudo apt-get install mysql-server mysql-client
sudo apt-get install php5 php5-mysql 
sudo apt-get install libgd2-xpm libgd2-xpm-dev php5-gd 
sudo apt-get install mediawiki
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
設定 MediaWiki 的 config 檔：&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;sudo vi /etc/mediawiki/apache.conf

- &lt;span style=&quot;color: #888888;&quot;&gt;#Alias /mediawiki /var/lib/mediawiki&lt;/span&gt;
+ Alias /mediawiki /var/lib/mediawiki

service apache2 restart
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
在 Ubuntu 14.04 之後的版本，需要額外執行下面這一行，&lt;br /&gt;
才能看到 MediaWiki 的設定畫面（記得 Apache 要重啟）：&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;sudo a2enconf mediawiki
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
之後連入 http://localhost/mediawiki ，跟著設定畫面一一設定，&lt;br /&gt;
最後會在網頁上自動產生一個 LocalSettings.php 以供下載，這時就這樣做：&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;sudo cp /var/lib/mediawiki/config/LocalSettings.php /etc/mediawiki/LocalSettings.php
sudo chown www-data /etc/mediawiki/LocalSettings.php
sudo chmod 600 /etc/mediawiki/LocalSettings.php
sudo rm -Rf /var/lib/mediawiki/config
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
如果找不到 ~/mediawiki/config/ 這個資料夾，那就開啟 samba 把檔案丟進去即可。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
如要自訂 Logo, 根據參考連結二的說法，可自定一個 135x135 的大小的圖片，&lt;br /&gt;
然後將之放入資料夾內，&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;sudo cp /var/lib/mediawiki/config/LocalSettings.php /etc/mediawiki/LocalSettings.php
sudo chown www-data /etc/mediawiki/LocalSettings.php
sudo chmod 600 /etc/mediawiki/LocalSettings.php
sudo rm -Rf /var/lib/mediawiki/config
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
並更改 LocalSettings.php 檔，最後再把權限改為 644 即可：&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;vim /etc/mediawiki/LocalSettings.php

&lt;span style=&quot;color: #996633;&quot;&gt;$wgLogo&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;/mediawiki/skins/common/images/my_new_logo.png&quot;&lt;/span&gt; ;&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
如要新增管理者 (sysop) 帳號，在 shell 底下使用 php 指令並透過 maintenance/createAndPromote.php 來更改 ：&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;* 行政人員
php maintenance/createAndPromote.php --username admin --password etro --bureaucrat

* 管理者
php maintenance/createAndPromote.php --username admin --password etro --sysop
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
修改首頁標題，進入以下頁面直接編輯修改即可&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;MediaWiki:Mainpage 
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
其他諸如修改工具箱頁面、開啟上傳圖片功能等等，可在參考資料的第四個連結找到 XD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
參考頁面：&lt;br /&gt;
&lt;a href=&quot;http://nchusg-info.blogspot.tw/2012/12/mediawiki-ubuntu.html&quot; target=&quot;_blank&quot;&gt;[黑天鵝] 資訊部門研究筆記&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://help.ubuntu.com/community/MediaWiki&quot; target=&quot;_blank&quot;&gt;https://help.ubuntu.com/community/MediaWiki&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.mediawiki.org/wiki/Manual:FAQ#Initial_user_was_not_created_by_installer_or_it_is_not_an_administrator&quot; target=&quot;_blank&quot;&gt;Mediawiki: F&amp;amp;Q&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://blog.sina.com.cn/s/blog_622134fd01014v2l.html&quot; target=&quot;_blank&quot;&gt;Mediawiki 使用技巧小结(转) &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
延伸閱讀：&lt;br /&gt;
&lt;a href=&quot;http://blog.miniasp.com/post/2012/06/23/apache2-Could-not-reliably-determine-the-server-fully-qualified-domain-name-using-for-ServerName.aspx&quot; target=&quot;_blank&quot;&gt;解決啟動 Apache 網站伺服器時找不到 ServerName 的問題&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://rainstingtw.blogspot.com/feeds/8470919256018115125/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://rainstingtw.blogspot.com/2014/06/install-mediawiki-at-ubuntu-server.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/8470919256018115125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/8470919256018115125'/><link rel='alternate' type='text/html' href='http://rainstingtw.blogspot.com/2014/06/install-mediawiki-at-ubuntu-server.html' title='在 Ubuntu Server 上安裝自己的 WikiMedia'/><author><name>Rainstring</name><uri>http://www.blogger.com/profile/18331666332301272398</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-4245136694152797021.post-3771224410763207051</id><published>2014-05-08T11:53:00.001+08:00</published><updated>2014-05-08T11:53:09.648+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="程式應用"/><title type='text'>[Patch] TLV320AIC3X Driver Patch Code with MICBIAS</title><content type='html'>&lt;br&gt;
由於工作需求，因此需要針對 tlv320aic3x 的 driver 做 MICBIAS 的修改&lt;br&gt;
（官方到了新版這部份還是沒改...）&lt;br&gt;
&lt;br&gt;
然後在網路上找到了這份 Patch，趁著這個機會來記錄 &amp;amp; 說明一下：&lt;br&gt;
&lt;br&gt;
這份 Patch 主要在新增 320AIC driver 內，提供 MICBIAS 的 voltage widget，&lt;br&gt;
並且設定在 target board 內。這樣就可以有效的調整 MICBIAS 的值了！&lt;br&gt;
&lt;br&gt;
完整 Patch Code 如下，有需要的就自行取用吧：&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://rainstingtw.blogspot.com/2014/05/patch-tlv320aic3x-driver-micbias.html#more&quot;&gt;閱讀更多 »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://rainstingtw.blogspot.com/feeds/3771224410763207051/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://rainstingtw.blogspot.com/2014/05/patch-tlv320aic3x-driver-micbias.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/3771224410763207051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/3771224410763207051'/><link rel='alternate' type='text/html' href='http://rainstingtw.blogspot.com/2014/05/patch-tlv320aic3x-driver-micbias.html' title='[Patch] TLV320AIC3X Driver Patch Code with MICBIAS'/><author><name>Rainstring</name><uri>http://www.blogger.com/profile/18331666332301272398</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-4245136694152797021.post-3010099967063225949</id><published>2014-03-26T14:23:00.000+08:00</published><updated>2014-03-26T14:23:38.739+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="SVN"/><title type='text'>如何在 SVN 新增/刪除大量的檔案</title><content type='html'>感謝 Wolfer 大大提供教學，在此記錄一下：&lt;br /&gt;
&lt;br /&gt;
最近遭遇一個問題，就是廠商提供的SDK，在套用了patch之後，&lt;br /&gt;
除了修改檔案之外，還可能會新增/刪除檔案。&lt;br /&gt;
&lt;br /&gt;
而這些新增/刪除的檔案，可能數量不少，而且散在目錄結構的各處，&lt;br /&gt;
使得手動新增/刪除也既方便也容易造成錯誤。&lt;br /&gt;
&lt;br /&gt;
因此從網路上找到了方法，說明如下：&lt;br /&gt;
&lt;br /&gt;
1. svn status&lt;br /&gt;
svn status 這個指令，可以列出目前目錄下的檔案狀態。&lt;br /&gt;
它會把所有被 修改/新增/刪除 的檔案列出來。&lt;br /&gt;
&lt;br /&gt;
畫面最左邊會列出這個檔案的狀況：&lt;br /&gt;
M：此檔案被修改過&lt;br /&gt;
？：此檔案不在 SVN 的管控下（通常是新增檔案）&lt;br /&gt;
！：檔案遺失（通常是被刪除）&lt;br /&gt;
A：新增（透過 SVN add 指令加入）&lt;br /&gt;
D：刪除（透過 SVN del 指令刪除）&lt;br /&gt;
&lt;br /&gt;
2. grep&lt;br /&gt;
使用 grep ^? （或 grep ^!）來找出 新增 （或刪除）的檔案&lt;br /&gt;
&lt;br /&gt;
3. sed&lt;br /&gt;
使用 sed ‘s/?//g’ （或 sed ‘s/!//g’） 來把 ‘?’ （或 ‘!’）移除&lt;br /&gt;
&lt;br /&gt;
4. svn add （或 svn del）&lt;br /&gt;
使用 svn add （或 svn del） 來 新增/刪除 檔案&lt;br /&gt;
&lt;br /&gt;
把四個步驟整合在一起就變成：&lt;br /&gt;
&lt;br /&gt;
新增用&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;svn status | grep ^? | sed &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;s/?//g&#39;&lt;/span&gt; | xargs svn add &lt;span style=&quot;color: #996633;&quot;&gt;$1&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
刪除則用&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;svn status | grep ^! | sed &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;s/!//g&#39;&lt;/span&gt; | xargs svn del &lt;span style=&quot;color: #996633;&quot;&gt;$1&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://rainstingtw.blogspot.com/feeds/3010099967063225949/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://rainstingtw.blogspot.com/2014/03/Add-del-large-mount-files-by-svn.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/3010099967063225949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/3010099967063225949'/><link rel='alternate' type='text/html' href='http://rainstingtw.blogspot.com/2014/03/Add-del-large-mount-files-by-svn.html' title='如何在 SVN 新增/刪除大量的檔案'/><author><name>Rainstring</name><uri>http://www.blogger.com/profile/18331666332301272398</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-4245136694152797021.post-48387251119887430</id><published>2014-03-04T11:47:00.000+08:00</published><updated>2014-03-04T11:47:22.361+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="程式應用"/><title type='text'>[Iperf] Iperf Porting and Testing Bandwidth Commands</title><content type='html'>這篇主要介紹的是 Iperf 要如何透過 cross-compile 來 porting 到不同的平台上。&lt;br /&gt;
&lt;br /&gt;
Iperf 下載網址：&lt;a href=&quot;http://iperf.fr/&quot; target=&quot;_blank&quot;&gt;http://iperf.fr/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
第一個範例是 Porting 到 Cavium 的 ECONA 平台上，第二個是 Porting 到 Ti 的系列平台上，&lt;br /&gt;
在文章最後並會介紹 Iperf 的簡單用法，現介紹如下：&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Porting ==&lt;br /&gt;
&lt;br /&gt;
** ECONA Platform **&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;1. get iperf-2.0.5.tar.gz from http://sourceforge.net/projects/iperf/
2. tar zxvf iperf-2.0.5.tar.gz
3. cd iperf-2.0.5$
4. export PATH=$PATH:/opt/cnstools/arm-linux-le-uclibc-gcc-4.3.3-2010.05/usr/bin
5. chmod 777 configure
6. chmod 777 config.h
7. ./configure –host=arm-linux CC=arm-linux-gcc”
8. comment “#define malloc rpl_malloc” in config.h (if you have ac_cv_func_malloc_0_nonnull=yes in previous line, you don’t need to do this)
9. make
10. you can find binary “iperf” in directory “src”
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
** Ti Platform **&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;1. Download and un-pack the source code.
2. ./configure --host=arm-arago-linux-gnueabi CC=arm-arago-linux-gnueabi-gcc CXX=arm-arago-linux-gnueabi-g++ CXXCPP=&quot;arm-arago-linux-gnueabi-g++ -E&quot;
3. make
4. comment “#define malloc rpl_malloc” in config.h
5. you can find binary “iperf” in directory “src”
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Command ==&lt;br /&gt;
&lt;br /&gt;
如果要比較簡單的結果就用這組設定來搭配就好：&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;* Server:
excute “iperf -s”

* cient:
excute “iperf -c serverip -n 1000M”
or
excute “iperf -c serverip -w128k -i21 -t60 -P6 -p5001 ”
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
另外這組是用來測試 Wifi Throughput 的 command：&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;* Iperf Tcp Commands:(HT 20 and HT 40)
Server: iperf -s -f -m
Clinet: iperf -c &amp;lt;server ip&amp;gt; -t 30 -f -m -i 2

* Iperf Udp Commands:(HT 20)
Server: iperf -s -f -m
Clinet: iperf -c &amp;lt;server ip&amp;gt; -t 30 -f -m -i 2 -u -b 90M

* Iperf Udp Commands:(HT 40)
Server: iperf -s -f -m
Clinet: iperf -c &amp;lt;server ip&amp;gt; -t 30 -f -m -i 2 -u -b 300M
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
之前有做過，只是不知道為什麼這邊沒有記錄到，所以來寫一下。</content><link rel='replies' type='application/atom+xml' href='http://rainstingtw.blogspot.com/feeds/48387251119887430/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://rainstingtw.blogspot.com/2014/03/Iperf-Porting-Econa-Ti-Bandwidth-Commands.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/48387251119887430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/48387251119887430'/><link rel='alternate' type='text/html' href='http://rainstingtw.blogspot.com/2014/03/Iperf-Porting-Econa-Ti-Bandwidth-Commands.html' title='[Iperf] Iperf Porting and Testing Bandwidth Commands'/><author><name>Rainstring</name><uri>http://www.blogger.com/profile/18331666332301272398</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-4245136694152797021.post-2645960463588700056</id><published>2014-01-08T16:07:00.000+08:00</published><updated>2014-01-08T23:32:27.571+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apple"/><title type='text'>[iOS] iTunes 無法備份 iPhone，因為無法以 iPhone 來啟始同步階段</title><content type='html'>最近在透過 iTunes 來備份 / 回覆我的 iPhone 時，常常會出現這個字眼：&lt;br /&gt;
「iTunes 無法備份 iPhone，因為無法以 iPhone 來啟始同步階段」&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
原因不明，但 Apple 也知道這個情況，並在官網上提供了解決辦法：&lt;br /&gt;
&lt;a href=&quot;http://support.apple.com/kb/TS2529?viewlocale=zh_TW&amp;amp;locale=zh_TW&quot; target=&quot;_blank&quot;&gt;http://support.apple.com/kb/TS2529?viewlocale=zh_TW&amp;amp;locale=zh_TW&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;如果無法以新使用者的身分進行備份，請嘗試重置 Lockdown 檔案夾。重置 Lockdown 檔案夾後，您也許就可以啟動或儲存備份。

1. 從電腦拔下所有 iOS 裝置，然後結束 iTunes。
2. 重置(刪除、更名） Lockdown 檔案夾。&lt;/pre&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;3. 重新開機
4. 插入 iOS 裝置。
5. 打開 iTunes 並嘗試進行備份。
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Lockdown 資料夾的位置：&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;1. Vista / Win 7 / Win 8 的位置在：
C:&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\p&lt;/span&gt;rogramdata&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\a&lt;/span&gt;pple&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\l&lt;/span&gt;ockdown&amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;2. XP 的位置在：
C:&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\D&lt;/span&gt;ocuments and Settings&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\A&lt;/span&gt;ll Users&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\A&lt;/span&gt;pplication Data&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\A&lt;/span&gt;pple&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\l&lt;/span&gt;ockdown
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
如果找不到資料夾的位置，可以這樣做：&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;1. 選擇 開始 -&amp;gt; 執行 -&amp;gt; 輸入 %ProgramData% 並按一下執行 -&amp;gt; 連按兩下 Apple 檔案夾 -&amp;gt; 即可找到 Lockdown 檔案夾。

2. 由於 ProgramData 是隱藏資料夾，因此先在檔案總管的工具列的「工具」&amp;gt;「 資料夾選項」中的「檢視」頁籤，將「隱藏檔案和資料夾」改為「顯示隱藏的檔案、資料夾及磁碟機」，這樣就能找到了。
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
參考資料：&lt;br /&gt;
1.&amp;nbsp;&lt;a href=&quot;http://allennotebook.blogspot.tw/2013/10/itunes-iphone-iphone.html&quot; target=&quot;_blank&quot;&gt;http://allennotebook.blogspot.tw/2013/10/itunes-iphone-iphone.html&lt;/a&gt;&lt;br /&gt;
2.&amp;nbsp;&lt;a href=&quot;http://www.mobile01.com/topicdetail.php?f=383&amp;amp;t=3554867&amp;amp;p=1&quot; target=&quot;_blank&quot;&gt;http://www.mobile01.com/topicdetail.php?f=383&amp;amp;t=3554867&amp;amp;p=1&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://rainstingtw.blogspot.com/feeds/2645960463588700056/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://rainstingtw.blogspot.com/2014/01/iTunes-Reset-Lockdown.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/2645960463588700056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/2645960463588700056'/><link rel='alternate' type='text/html' href='http://rainstingtw.blogspot.com/2014/01/iTunes-Reset-Lockdown.html' title='[iOS] iTunes 無法備份 iPhone，因為無法以 iPhone 來啟始同步階段'/><author><name>Rainstring</name><uri>http://www.blogger.com/profile/18331666332301272398</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-4245136694152797021.post-7070378288880047272</id><published>2013-10-17T12:15:00.000+08:00</published><updated>2013-10-17T12:15:02.212+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Git"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>設定 Git 的環境變數 - Git config</title><content type='html'>這裡記錄一下目前會用到的 git config 設定&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: #888888;&quot;&gt;# 設定使用者資訊&lt;/span&gt;
git config --global user.name &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;Steven&quot;&lt;/span&gt;
git config --global user.email &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;steven@helloworld.com&quot;&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;# 設定顏色顯示&lt;/span&gt;
git config --global color.ui auto
git config --global color.diff auto 
git config --global color.status auto 
git config --global color.branch auto
git config --global color.log auto 

&lt;span style=&quot;color: #888888;&quot;&gt;# 設定 alias&lt;/span&gt;
git config --global alias.st status
git config --global alias.co checkout

&lt;span style=&quot;color: #888888;&quot;&gt;# 如要忽略空白的比對，可增加以下這個&lt;/span&gt;
git config --global apply.whitespace nowarn
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
設定完之後，在個人的家目錄底下去 cat .gitconfig ，即會看到此資訊&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;[&lt;/span&gt;push&lt;span style=&quot;color: #333333;&quot;&gt;]&lt;/span&gt;
        &lt;span style=&quot;color: #996633;&quot;&gt;default&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; matching
&lt;span style=&quot;color: #333333;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;alias&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;]&lt;/span&gt;
        &lt;span style=&quot;color: #996633;&quot;&gt;st&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; status    &lt;span style=&quot;color: #888888;&quot;&gt;# 設定 status 縮寫&lt;/span&gt;
        &lt;span style=&quot;color: #996633;&quot;&gt;co&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; checkout  &lt;span style=&quot;color: #888888;&quot;&gt;# 設定 checkout 縮寫&lt;/span&gt;
&lt;span style=&quot;color: #333333;&quot;&gt;[&lt;/span&gt;color&lt;span style=&quot;color: #333333;&quot;&gt;]&lt;/span&gt;
        &lt;span style=&quot;color: #996633;&quot;&gt;ui&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; auto      &lt;span style=&quot;color: #888888;&quot;&gt;# 設定 ut 的顏色為 auto&lt;/span&gt;
        &lt;span style=&quot;color: #996633;&quot;&gt;diff&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; auto    &lt;span style=&quot;color: #888888;&quot;&gt;# diff &lt;/span&gt;
        &lt;span style=&quot;color: #996633;&quot;&gt;status&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; auto  &lt;span style=&quot;color: #888888;&quot;&gt;# status &lt;/span&gt;
        &lt;span style=&quot;color: #996633;&quot;&gt;branch&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; auto  &lt;span style=&quot;color: #888888;&quot;&gt;# branch&lt;/span&gt;
        &lt;span style=&quot;color: #996633;&quot;&gt;log&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; auto     &lt;span style=&quot;color: #888888;&quot;&gt;# log, 以上這幾種都會自動標色&lt;/span&gt;
&lt;span style=&quot;color: #333333;&quot;&gt;[&lt;/span&gt;user&lt;span style=&quot;color: #333333;&quot;&gt;]&lt;/span&gt;
        &lt;span style=&quot;color: #996633;&quot;&gt;name&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Steven Wu
        &lt;span style=&quot;color: #996633;&quot;&gt;email&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; steven@helloworld.com
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
參考資料：&lt;br /&gt;
&lt;a href=&quot;http://gogojimmy.net/2012/01/17/how-to-use-git-1-git-basic/&quot; target=&quot;_blank&quot;&gt;http://gogojimmy.net/2012/01/17/how-to-use-git-1-git-basic/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://blog.longwin.com.tw/2009/05/git-initial-env-setup-2009/&quot; target=&quot;_blank&quot;&gt;http://blog.longwin.com.tw/2009/05/git-initial-env-setup-2009/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://rainstingtw.blogspot.com/feeds/7070378288880047272/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://rainstingtw.blogspot.com/2013/10/How-to-set-git-config-color-alias.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/7070378288880047272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/7070378288880047272'/><link rel='alternate' type='text/html' href='http://rainstingtw.blogspot.com/2013/10/How-to-set-git-config-color-alias.html' title='設定 Git 的環境變數 - Git config'/><author><name>Rainstring</name><uri>http://www.blogger.com/profile/18331666332301272398</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-4245136694152797021.post-5606991405339423456</id><published>2013-10-16T15:32:00.000+08:00</published><updated>2013-10-16T15:32:01.850+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="Ubuntu"/><title type='text'>在舊版 Ubuntu 底下安裝新版 git 套件 （以 Ubuntu 8.04 hardy 為例）</title><content type='html'>最近由於工作需求，需要在舊版的 Ubuntu 上面安裝 git 套件，&lt;br /&gt;
但由於舊版的 Ubuntu 版本已不支援「直接」透過 apt-get update 來更新 source list，&lt;br /&gt;
於是用了另一種方法來直接安裝 git，方法如下：&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
下載目前最新版的 git-1.8.4.1 版本，並且解壓縮並安裝&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;wget http://www.kernel.org/pub/software/scm/git/git-1.8.4.1.tar.gz
tar zxvf git-1.8.4.1.tar.gz
&lt;span style=&quot;color: #007020;&quot;&gt;cd &lt;/span&gt;git-1.8.4.1
./configure
make make install
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
之後就可以開心的建立 Git repository 了！&lt;br /&gt;
&lt;br /&gt;
參考資料：&lt;br /&gt;
&lt;a href=&quot;http://serengetisunset.blogspot.tw/2009/02/installing-git-1613-on-ubuntu-804.html&quot; target=&quot;_blank&quot;&gt;http://serengetisunset.blogspot.tw/2009/02/installing-git-1613-on-ubuntu-804.html&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://rainstingtw.blogspot.com/feeds/5606991405339423456/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://rainstingtw.blogspot.com/2013/10/How-to-install-git-at-old-ubuntu-8.04-hardy.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/5606991405339423456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/5606991405339423456'/><link rel='alternate' type='text/html' href='http://rainstingtw.blogspot.com/2013/10/How-to-install-git-at-old-ubuntu-8.04-hardy.html' title='在舊版 Ubuntu 底下安裝新版 git 套件 （以 Ubuntu 8.04 hardy 為例）'/><author><name>Rainstring</name><uri>http://www.blogger.com/profile/18331666332301272398</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-4245136694152797021.post-1755619469967013499</id><published>2013-07-26T16:01:00.000+08:00</published><updated>2013-07-26T16:01:45.036+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="程式應用"/><title type='text'>在 Linux 底下，如何讓 CPU 使用率達到 100% (使用 md5sum 與 gzip)</title><content type='html'>在工作上，由於 HW 要做溫度的相關測試，&lt;br /&gt;
因此要想辦法讓 CPU 使用率拉到 100%，藉此來提高整體溫度。&lt;br /&gt;
&lt;br /&gt;
這邊有個很簡單的方法，分享給大家：&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/anonymous/7a4d901017223692d393.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
簡單。好用，提供給大家做參考！</content><link rel='replies' type='application/atom+xml' href='http://rainstingtw.blogspot.com/feeds/1755619469967013499/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://rainstingtw.blogspot.com/2013/07/Use-md5sum-gzip-CPU-fullloading.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/1755619469967013499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/1755619469967013499'/><link rel='alternate' type='text/html' href='http://rainstingtw.blogspot.com/2013/07/Use-md5sum-gzip-CPU-fullloading.html' title='在 Linux 底下，如何讓 CPU 使用率達到 100% (使用 md5sum 與 gzip)'/><author><name>Rainstring</name><uri>http://www.blogger.com/profile/18331666332301272398</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-4245136694152797021.post-4800007870715835471</id><published>2013-07-05T11:16:00.000+08:00</published><updated>2013-07-05T11:16:03.648+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="程式應用"/><title type='text'>建立 git repository 時，要如何找出空目錄，以避免 build code 失敗？</title><content type='html'>&lt;br /&gt;
在過去的經驗裡，使用 git 管理 project source code 最討厭遇到空目錄 (empty directory)，偏偏我們在 build firmware image 時，常常會需要這樣的目錄，例如 root filesystem 的 /etc, /var, /dev 等等這些目錄。&lt;br /&gt;
&lt;br /&gt;
假如 Makefile 沒有寫好的話，會假設這些目錄是存在的，但是因為 git 並不會儲存空的目錄，這會導致當我們將 project 從 git server clone 下來後，空目錄消失，然後 compile 就 fail 了。&lt;br /&gt;
&lt;br /&gt;
多半這時候的解法就是透過 directory comparison 的工具，例如 Araxis Merge, Beyond Compare，或是 meld 等等，找出空目錄，touch 一個檔案，把檔案加入 git 管理，這樣就可以避免這樣的問題了。&lt;br /&gt;
&lt;br /&gt;
過去我是這樣解決的：&lt;br /&gt;
在 project 目錄下，我會執行以下的指令：&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/anonymous/e433423cd3af39c1ebad.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
find 這個指令大家多少都用過，就不多做解釋&lt;br /&gt;
-type d 就是找出目錄，man page 說明如下：&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/anonymous/98bb2e0c3940f33008b6.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
-empty 就是空檔案或是空目錄的，man page說明如下：&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/anonymous/b9e6d8febda9c950d86a.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
-exec find 指令產生的 output，可以有幾種針對 output 做後續處理的方法，其中一種比較直覺的就是透過 exec，將 output 作為新指令的輸入，有點類似 pipeline ( | ) 的概念；exec 的參數必須以 &quot; ; &quot; 結尾，又因為在 shell 下，這個符號有其他用途，所以必須用反斜線標記 (\)，然後 &quot; { } &quot; 是代表前面 find 指令的 output string。man page 說明如下：&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/anonymous/6c1c7ba5781f38f73e22.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
最後， .gitignore 是 open source community 中，滿常被用來解決這問題的空檔案，而且同時又是 git 本身會 check 的特殊檔案，所以我都是拿這個檔案作為保留空目錄使用。&lt;br /&gt;
&lt;br /&gt;
附註：在搜尋的過程中，也有人建議：如果在空目錄內新增一個 README 之類的檔案，藉以說明這個目錄是用來做什麼的，也是一個不錯的好選擇。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://rainstingtw.blogspot.com/feeds/4800007870715835471/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://rainstingtw.blogspot.com/2013/07/how-to-add-empty-folder-for-git.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/4800007870715835471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/4800007870715835471'/><link rel='alternate' type='text/html' href='http://rainstingtw.blogspot.com/2013/07/how-to-add-empty-folder-for-git.html' title='建立 git repository 時，要如何找出空目錄，以避免 build code 失敗？'/><author><name>Rainstring</name><uri>http://www.blogger.com/profile/18331666332301272398</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-4245136694152797021.post-8902693341005501228</id><published>2013-02-06T16:15:00.000+08:00</published><updated>2013-04-18T14:04:03.109+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>[Kernel] error: ‘PATH_MAX’ undeclared (first use in this function)</title><content type='html'>如標題所說，今天在嘗試 Build Kernel 時發現了這個問題：&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; background: white; border-width: .1em .1em .1em .8em; border: solid gray; color: black; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;scripts/mod/sumversion.c: In &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;function&lt;/span&gt; ‘get_src_version’:
scripts/mod/sumversion.c:384: error: ‘PATH_MAX’ undeclared &lt;span style=&quot;color: #303030;&quot;&gt;(&lt;/span&gt;first use in this &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #303030;&quot;&gt;)&lt;/span&gt;
scripts/mod/sumversion.c:384: error: &lt;span style=&quot;color: #303030;&quot;&gt;(&lt;/span&gt;Each undeclared identifier is reported only once
scripts/mod/sumversion.c:384: error: &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;for &lt;/span&gt;each &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;function &lt;/span&gt;it appears in.&lt;span style=&quot;color: #303030;&quot;&gt;)&lt;/span&gt;
scripts/mod/sumversion.c:384: warning: unused variable ‘filelist’
make&lt;span style=&quot;color: #303030;&quot;&gt;[&lt;/span&gt;4&lt;span style=&quot;color: #303030;&quot;&gt;]&lt;/span&gt;: *** &lt;span style=&quot;color: #303030;&quot;&gt;[&lt;/span&gt;scripts/mod/sumversion.o&lt;span style=&quot;color: #303030;&quot;&gt;]&lt;/span&gt; Error 1
make&lt;span style=&quot;color: #303030;&quot;&gt;[&lt;/span&gt;3&lt;span style=&quot;color: #303030;&quot;&gt;]&lt;/span&gt;: *** &lt;span style=&quot;color: #303030;&quot;&gt;[&lt;/span&gt;scripts/mod&lt;span style=&quot;color: #303030;&quot;&gt;]&lt;/span&gt; Error 2
make&lt;span style=&quot;color: #303030;&quot;&gt;[&lt;/span&gt;2&lt;span style=&quot;color: #303030;&quot;&gt;]&lt;/span&gt;: *** &lt;span style=&quot;color: #303030;&quot;&gt;[&lt;/span&gt;scripts&lt;span style=&quot;color: #303030;&quot;&gt;]&lt;/span&gt; Error 2
make&lt;span style=&quot;color: #303030;&quot;&gt;[&lt;/span&gt;2&lt;span style=&quot;color: #303030;&quot;&gt;]&lt;/span&gt;: Leaving directory &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;`&lt;/span&gt;/home/steven_wu/dsr1000n/linux/kernel_2.6/linux&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;&lt;/span&gt;
&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;make[1]: *** [linux] Error 2&lt;/span&gt;
&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;make[1]: Leaving directory `/home/steven_wu/dsr1000n/linux/kernel_2.6&#39;&lt;/span&gt;
make: *** &lt;span style=&quot;color: #303030;&quot;&gt;[&lt;/span&gt;kernel&lt;span style=&quot;color: #303030;&quot;&gt;]&lt;/span&gt; Error 2
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
這時只需要：&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; background: white; border-width: .1em .1em .1em .8em; border: solid gray; color: black; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;vim scripts/mod/sumversion.c
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
查看最上面的宣告中是否有 include &amp;nbsp;limits.h ，若沒有，則加入一行：&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; background: white; border-width: .1em .1em .1em .8em; border: solid gray; color: black; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: #507090;&quot;&gt;#include &amp;lt;limits.h&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
--&lt;br /&gt;
做個筆記</content><link rel='replies' type='application/atom+xml' href='http://rainstingtw.blogspot.com/feeds/8902693341005501228/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://rainstingtw.blogspot.com/2013/02/error-PATHMAX-undeclared.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/8902693341005501228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/8902693341005501228'/><link rel='alternate' type='text/html' href='http://rainstingtw.blogspot.com/2013/02/error-PATHMAX-undeclared.html' title='[Kernel] error: ‘PATH_MAX’ undeclared (first use in this function)'/><author><name>Rainstring</name><uri>http://www.blogger.com/profile/18331666332301272398</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-4245136694152797021.post-9146973538441985139</id><published>2012-12-10T18:51:00.000+08:00</published><updated>2012-12-10T18:51:07.480+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>解決 Error opening terminal: xterm 的問題</title><content type='html'>最近在玩某個 SDK 的 menuconfig，突然發現到他會跳出一堆錯誤訊息：&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; background: white; border-width: .1em .1em .1em .8em; border: solid gray; color: black; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;root&lt;span style=&quot;color: #505050; font-weight: bold;&quot;&gt;@xxxxx&lt;/span&gt;:&lt;span style=&quot;color: #303030;&quot;&gt;/&lt;/span&gt;home&lt;span style=&quot;color: #303030;&quot;&gt;/&lt;/span&gt;steven_wu&lt;span style=&quot;color: #303030;&quot;&gt;/&lt;/span&gt;xxxx&lt;span style=&quot;color: #303030;&quot;&gt;/&lt;/span&gt;xxxxx&lt;span style=&quot;color: grey;&quot;&gt;# make menuconfig&lt;/span&gt;

(中略) 

Error opening terminal: xterm&lt;span style=&quot;color: #303030;&quot;&gt;.&lt;/span&gt;

make: &lt;span style=&quot;color: #303030;&quot;&gt;***&lt;/span&gt; [menuconfig] Error &lt;span style=&quot;color: #0000d0; font-weight: bold;&quot;&gt;1&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
上網 google 了一下解法，發現到說：&lt;br /&gt;
&lt;br /&gt;
由於我使用 putty 來登入 ssh，其內建預設的 Terminal-type 為&amp;nbsp;&lt;span style=&quot;line-height: 16px;&quot;&gt;xterm，&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;line-height: 16px;&quot;&gt;因此他在 link 到&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 16px;&quot;&gt;/usr/share/terminfo 的 ~/x/ folder 時，會發現找不到 xterm 來供他使用。&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;line-height: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;line-height: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;line-height: 16px;&quot;&gt;於是有以下兩種解決辦法：&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;line-height: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;line-height: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;line-height: 16px;&quot;&gt;1. 參考（大陸網頁）&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://www.linuxidc.com/Linux/2011-04/34704.htm&quot; target=&quot;_blank&quot;&gt;http://www.linuxidc.com/Linux/2011-04/34704.htm&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
宣告環境變數，使用 vt100 來取代之&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; background: white; border-width: .1em .1em .1em .8em; border: solid gray; color: black; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;export TERM&lt;span style=&quot;color: #303030;&quot;&gt;=&lt;/span&gt;vt100

export TERMINFO&lt;span style=&quot;color: #303030;&quot;&gt;=/&lt;/span&gt;usr&lt;span style=&quot;color: #303030;&quot;&gt;/&lt;/span&gt;share&lt;span style=&quot;color: #303030;&quot;&gt;/&lt;/span&gt;terminfo
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
或者是&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. 到&amp;nbsp;&lt;span style=&quot;color: #303030; line-height: 16px;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;line-height: 16px;&quot;&gt;usr&lt;/span&gt;&lt;span style=&quot;color: #303030; line-height: 16px;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;line-height: 16px;&quot;&gt;share&lt;/span&gt;&lt;span style=&quot;color: #303030; line-height: 16px;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;line-height: 16px;&quot;&gt;terminfo/x/ 內，建立一個 link ，讓 xterm 指到漂亮的彩色文字編輯器：&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; background: white; border-width: .1em .1em .1em .8em; border: solid gray; color: black; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;cd &lt;span style=&quot;color: #303030;&quot;&gt;/&lt;/span&gt;usr&lt;span style=&quot;color: #303030;&quot;&gt;/&lt;/span&gt;share&lt;span style=&quot;color: #303030;&quot;&gt;/&lt;/span&gt;terminfo&lt;span style=&quot;color: #303030;&quot;&gt;/&lt;/span&gt;x&lt;span style=&quot;color: #303030;&quot;&gt;/&lt;/span&gt;

ln &lt;span style=&quot;color: #303030;&quot;&gt;-&lt;/span&gt;s xterm&lt;span style=&quot;color: #303030;&quot;&gt;-&lt;/span&gt;color xterm
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
這樣就可以在 putty 底下看到漂亮的 menuconfig 了。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PS. 用 SecureCRT 來連線，由於其內預設使用 VT100，因此不會有這個問題。</content><link rel='replies' type='application/atom+xml' href='http://rainstingtw.blogspot.com/feeds/9146973538441985139/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://rainstingtw.blogspot.com/2012/12/error-opening-terminal-xterm.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/9146973538441985139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/9146973538441985139'/><link rel='alternate' type='text/html' href='http://rainstingtw.blogspot.com/2012/12/error-opening-terminal-xterm.html' title='解決 Error opening terminal: xterm 的問題'/><author><name>Rainstring</name><uri>http://www.blogger.com/profile/18331666332301272398</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-4245136694152797021.post-6731029071316968250</id><published>2012-11-12T23:00:00.004+08:00</published><updated>2012-11-12T23:00:46.007+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PPS"/><category scheme="http://www.blogger.com/atom/ns#" term="程式應用"/><title type='text'>PPS手動去廣告方法 （Win 7 可用）</title><content type='html'>我用的是官網最新下載的版本 (V2.7.0.1512)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
然後根據這篇的方法來操作的 （Under Windows 7），懶得看的人可以直接看這篇：&lt;br /&gt;
&lt;br /&gt;
對岸網站：&lt;br /&gt;
&lt;a href=&quot;http://blog.163.com/zhulangtianya@126/blog/static/12675033020103634350549/&quot; target=&quot;_blank&quot;&gt;http://blog.163.com/zhulangtianya@126/blog/static/12675033020103634350549/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
在這邊簡單說一下我的操作方法：&lt;br /&gt;
&lt;br /&gt;
1. 關閉 PPS 加速器：&lt;br /&gt;
工具 -&amp;gt; 選項 -&amp;gt; 點播服務，然後把「允許 PPS 運行加速器...」（什麼的）給關掉，&lt;br /&gt;
這樣就不會使用快取來佔用你的硬碟空間（PPS會預先讀取影片資料 &amp;amp; 把快取檔存&lt;br /&gt;
放到你的硬碟上）&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. 去廣告（記得先關閉 PPS）：&lt;br /&gt;
&lt;br /&gt;
XP用戶在：C:\Documents and Settings\Administrator\Application Data\PPStream\&lt;br /&gt;
Win7用戶在：C:\Users\用户名\AppData\Roaming\PPStream\&lt;br /&gt;
&lt;br /&gt;
然後把&amp;nbsp;adsys 底下的資料全清空，然後限制資料夾的存取權限。以 Win 7 為例，對著&lt;br /&gt;
資料夾按右鍵 -&amp;gt; 內容 -&amp;gt; 安全性 -&amp;gt; 然後點選到 Everone -&amp;gt; 在拒絕那邊全打勾&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
最後不免碎碎念一下，MAC 版的竟然本身就沒有廣告...真是坑爹阿&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://rainstingtw.blogspot.com/feeds/6731029071316968250/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://rainstingtw.blogspot.com/2012/11/Disable-PPStream-AD-Win7.html#comment-form' title='5 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/6731029071316968250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/6731029071316968250'/><link rel='alternate' type='text/html' href='http://rainstingtw.blogspot.com/2012/11/Disable-PPStream-AD-Win7.html' title='PPS手動去廣告方法 （Win 7 可用）'/><author><name>Rainstring</name><uri>http://www.blogger.com/profile/18331666332301272398</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>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4245136694152797021.post-8660119495689401509</id><published>2012-10-01T15:43:00.001+08:00</published><updated>2012-10-01T15:43:51.613+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="VirtualBox"/><title type='text'>透過 crontab 來定期備份 VirtualBox (ShapShot)</title><content type='html'>根據上一篇：&lt;a href=&quot;http://rainstingtw.blogspot.com/2012/09/use-VBoxManage-to-control-VirtualBox.html&quot; target=&quot;_blank&quot;&gt;透過 VBoxManage 來控制 VirtualBox&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
既然了解了如何下 command 來控制 virtualbox,&lt;br /&gt;
那麼我們便可以更進一步新增排程來定期備份了：&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. 在拍照 (Shapshot) 之前，我們需先讓機器暫時停止下來，並保留原先的狀態：&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; background: white; border-width: .1em .1em .1em .8em; border: solid gray; color: black; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;VBoxManage controlvm &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&amp;lt;VMName&amp;gt;&quot;&lt;/span&gt; savestate
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
2. 然後拍張照 (SnapShot)：&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; background: white; border-width: .1em .1em .1em .8em; border: solid gray; color: black; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;BoxManage snapshot &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&amp;lt;VMName&amp;gt;&quot;&lt;/span&gt; take &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&amp;lt;SnapshotName&amp;gt;&quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
3. 接著再將 vm 從暫停的狀態中啟動：&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; background: white; border-width: .1em .1em .1em .8em; border: solid gray; color: black; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;VBoxManage startvm &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&amp;lt;VMName&amp;gt;&quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
由於第二步驟要拍照時，需要為每次拍照的結果取個名字，&lt;br /&gt;
因此我寫了一個很簡單的 script ，來自動產生拍照的日期，並做完一系列流程：&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; background: white; border-width: .1em .1em .1em .8em; border: solid gray; color: black; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: grey;&quot;&gt;#!/bin/bash&lt;/span&gt;

&lt;span style=&quot;color: #906030;&quot;&gt;NAME&lt;/span&gt;&lt;span style=&quot;color: #303030;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;`&lt;/span&gt;date | head -c 7 | tail -c 3&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;`&lt;/span&gt;

&lt;span style=&quot;color: #007020;&quot;&gt;echo&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;savestate...&quot;&lt;/span&gt;
VBoxManage controlvm Zeus savestate

sleep 10

&lt;span style=&quot;color: #007020;&quot;&gt;echo&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;take snapshot...&quot;&lt;/span&gt;
vboxmanage snapshot Zeus take Zeus_&lt;span style=&quot;color: #906030;&quot;&gt;$NAME&lt;/span&gt;

sleep 10

&lt;span style=&quot;color: #007020;&quot;&gt;echo&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;startvm...&quot;&lt;/span&gt;
&lt;span style=&quot;color: grey;&quot;&gt;#VBoxManage startvm Zeus&lt;/span&gt;
nohup VBoxHeadless --startvm Zeus &amp;amp;

&lt;span style=&quot;color: grey;&quot;&gt;#echo Zeus_$NAME&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
這個 script 的缺點在於，產生的日期只有月份，對於要精準紀錄 log 時間的人來說有點不足...&lt;br /&gt;
（以後還有改進空間就是了）&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. 然後透過 crontab ，排入系統排程內：&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; background: white; border-width: .1em .1em .1em .8em; border: solid gray; color: black; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;crontab -e 

00 03 * * * sh &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&amp;lt;location&amp;gt;&quot;&lt;/span&gt;/backup_Zenus.sh &amp;amp;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
自動設定在每日凌晨三點來做這件事情&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
參考資料：&lt;a href=&quot;https://forums.virtualbox.org/viewtopic.php?f=7&amp;amp;t=24967&quot; target=&quot;_blank&quot;&gt;https://forums.virtualbox.org/viewtopic.php?f=7&amp;amp;t=24967&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://rainstingtw.blogspot.com/feeds/8660119495689401509/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://rainstingtw.blogspot.com/2012/10/crontab-take-snapshot.html#comment-form' title='2 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/8660119495689401509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/8660119495689401509'/><link rel='alternate' type='text/html' href='http://rainstingtw.blogspot.com/2012/10/crontab-take-snapshot.html' title='透過 crontab 來定期備份 VirtualBox (ShapShot)'/><author><name>Rainstring</name><uri>http://www.blogger.com/profile/18331666332301272398</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-4245136694152797021.post-4349686595145017601</id><published>2012-09-27T16:49:00.000+08:00</published><updated>2012-10-02T17:27:26.294+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="VirtualBox"/><title type='text'>解決 VirtualBox 無法開啟 NS_ERROR_FAILURE (0x80004005)</title><content type='html'>在亂搞之後，我的 VirtualBox 也一度沒辦法開啟過，以下簡單紀錄下我的解決方法：&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
問題紀錄（當然 VM 名稱不是這個）&lt;br /&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: gray; border-bottom-style: solid; border-image: initial; border-left-color: gray; border-left-style: solid; border-right-color: gray; border-right-style: solid; border-top-color: gray; border-top-style: solid; border-width: initial; overflow-x: auto; overflow-y: auto; padding-bottom: 0.2em; padding-left: 0.6em; padding-right: 0.6em; padding-top: 0.2em; width: auto;&quot;&gt;
&lt;pre style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #303030; line-height: 125%;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;line-height: 125%;&quot;&gt;root@localhost ~&lt;/span&gt;&lt;span style=&quot;color: #303030; line-height: 125%;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;line-height: 125%;&quot;&gt;# vboxmanage startvm &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 16px;&quot;&gt;&amp;lt;vmname&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;line-height: 125%;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 125%;&quot;&gt;
Waiting &lt;/span&gt;&lt;span style=&quot;color: green; font-weight: bold; line-height: 125%;&quot;&gt;for &lt;/span&gt;&lt;span style=&quot;line-height: 125%;&quot;&gt;VM &lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: black; line-height: 125%;&quot;&gt;&quot;&amp;lt;vmname&amp;gt;&quot;&lt;/span&gt;&lt;span style=&quot;line-height: 125%;&quot;&gt; to power on... 
VBoxManage: error: The virtual machine &lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: black; line-height: 125%;&quot;&gt;&#39;&amp;lt;vmname&amp;gt;&#39;&lt;/span&gt;&lt;span style=&quot;line-height: 125%;&quot;&gt; has terminated unexpectedly during startup with &lt;/span&gt;&lt;span style=&quot;color: #007020; line-height: 125%;&quot;&gt;exit &lt;/span&gt;&lt;span style=&quot;line-height: 125%;&quot;&gt;code 0 
VBoxManage: error: Details: code NS_ERROR_FAILURE &lt;/span&gt;&lt;span style=&quot;color: #303030; line-height: 125%;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;line-height: 125%;&quot;&gt;0x80004005&lt;/span&gt;&lt;span style=&quot;color: #303030; line-height: 125%;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;line-height: 125%;&quot;&gt;, component Machine, interface IMachine, callee  
&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
參考了網路上的解法之後，大概是這樣：&lt;br /&gt;
&lt;br /&gt;
1. 需要重新去掛載 VirtualBox 的 module:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; background: white; border-width: .1em .1em .1em .8em; border: solid gray; color: black; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;/etc/init.d/vboxdrv setup
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
2. 在 console 下重新執行一次 VM ，看看能不能動&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; background: white; border-width: .1em .1em .1em .8em; border: solid gray; color: black; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;vboxmanage startvm &amp;lt;vmname&amp;gt;&lt;vmname&gt;
&lt;/vmname&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
3. 再利用 console 把 vm 關掉，並重新開機&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; background: white; border-width: .1em .1em .1em .8em; border: solid gray; color: black; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;VBoxManage controlvm &amp;lt;vmname&amp;gt; poweroff
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
4. 然後再開就不會發生問題了。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
網路上的偏方與解法還不少，有的人建議要把 ~/.VirtualBox 底下的 .xml 檔刪除掉，可是這樣一來會造成&lt;br /&gt;
之前建立好的 VM 會消失不見（除非你剛灌好，不然就...）&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
參考看看吧～&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PS. 絕對不可以手殘亂去刪除 SnapShot 資料夾底下的資料，不然...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
參考資料：&lt;br /&gt;
&lt;a href=&quot;http://blog.csdn.net/t0nsha/article/details/7482986&quot; target=&quot;_blank&quot;&gt;http://blog.csdn.net/t0nsha/article/details/7482986&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://forum.ubuntu.org.cn/viewtopic.php?f=65&amp;amp;t=204736&quot; target=&quot;_blank&quot;&gt;http://forum.ubuntu.org.cn/viewtopic.php?f=65&amp;amp;t=204736&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://passover.blog.51cto.com/2431658/738067&quot; target=&quot;_blank&quot;&gt;http://passover.blog.51cto.com/2431658/738067&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://forums.virtualbox.org/viewtopic.php?f=7&amp;amp;t=44906&quot; target=&quot;_blank&quot;&gt;snapshot crashed vm, now inaccessible&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://rainstingtw.blogspot.com/feeds/4349686595145017601/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://rainstingtw.blogspot.com/2012/09/Virtualbox-NSERRORFAILURE-0x80004005.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/4349686595145017601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/4349686595145017601'/><link rel='alternate' type='text/html' href='http://rainstingtw.blogspot.com/2012/09/Virtualbox-NSERRORFAILURE-0x80004005.html' title='解決 VirtualBox 無法開啟 NS_ERROR_FAILURE (0x80004005)'/><author><name>Rainstring</name><uri>http://www.blogger.com/profile/18331666332301272398</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-4245136694152797021.post-2999835875189237162</id><published>2012-09-27T16:05:00.000+08:00</published><updated>2012-09-27T16:05:55.062+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu"/><title type='text'>在 Ubuntu 下使用 VNC 來連線</title><content type='html'>同樣紀錄一下我在 ubuntu 下使用 vnc 的心得：&lt;br /&gt;
&lt;br /&gt;
安裝過程不多說，請參考這篇文章（大陸）：&lt;br /&gt;
&lt;a href=&quot;http://os.51cto.com/art/201001/176802.htm&quot; target=&quot;_blank&quot;&gt;http://os.51cto.com/art/201001/176802.htm&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
然後我利用 ssh 先連入主機後，再執行 vncserver 來啟動 vnc 環境&lt;br /&gt;
（不隨著開機啟動）&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
值得注意的是：&lt;br /&gt;
&lt;br /&gt;
1.你用什麼身份登入（例如 root），所連線過去看到的登入環境就會是那個身份（也是 root）&lt;br /&gt;
&lt;br /&gt;
2. 在 &quot;~/.vnc/xstartup&quot; 底下，需要特別去把 x-window-manager 給 mark 掉，&lt;br /&gt;
並加入 gnome-session &amp;amp; ，像是：&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; background: white; border-width: .1em .1em .1em .8em; border: solid gray; color: black; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: grey;&quot;&gt;#!/bin/sh&lt;/span&gt;
&lt;span style=&quot;color: #007020;&quot;&gt;unset &lt;/span&gt;SESSION_MANAGER
xrdb &lt;span style=&quot;color: #906030;&quot;&gt;$HOME&lt;/span&gt;/.Xresources
xsetroot -solid grey
x-terminal-emulator -geometry 80x24+10+10 -ls -title &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;$VNCDESKTOP Desktop&quot;&lt;/span&gt; &amp;amp;
&lt;span style=&quot;color: grey;&quot;&gt;#!x-window-manager &amp;amp;&lt;/span&gt;
gnome-session &amp;amp;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
這樣透過 Client 端登入（例如 RealVNC）後看到的才會是 Ubuntu 原本的桌面環境，而不是&lt;br /&gt;
最陽春的 x-window&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://rainstingtw.blogspot.com/feeds/2999835875189237162/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://rainstingtw.blogspot.com/2012/09/use-vnc-to-connect-to-ubuntu.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/2999835875189237162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/2999835875189237162'/><link rel='alternate' type='text/html' href='http://rainstingtw.blogspot.com/2012/09/use-vnc-to-connect-to-ubuntu.html' title='在 Ubuntu 下使用 VNC 來連線'/><author><name>Rainstring</name><uri>http://www.blogger.com/profile/18331666332301272398</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-4245136694152797021.post-3774953443787794113</id><published>2012-09-27T15:55:00.001+08:00</published><updated>2012-10-02T17:30:01.538+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="VirtualBox"/><title type='text'>透過 VBoxManage 來控制 VirtualBox</title><content type='html'>在 VirtualBox 內，除了透過圖形化介面來控制我們的虛擬機器外，&lt;br&gt;
也可透過下 command 的方式來控制我們的虛擬機。&lt;br&gt;
&lt;br&gt;
這裡來紀錄一下，如何透過 VBoxManage 這個內建的 command 來控&lt;br&gt;
制 VirtualBox:，以下就介紹幾個常用的：&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://rainstingtw.blogspot.com/2012/09/use-VBoxManage-to-control-VirtualBox.html#more&quot;&gt;閱讀更多 »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://rainstingtw.blogspot.com/feeds/3774953443787794113/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://rainstingtw.blogspot.com/2012/09/use-VBoxManage-to-control-VirtualBox.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/3774953443787794113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/3774953443787794113'/><link rel='alternate' type='text/html' href='http://rainstingtw.blogspot.com/2012/09/use-VBoxManage-to-control-VirtualBox.html' title='透過 VBoxManage 來控制 VirtualBox'/><author><name>Rainstring</name><uri>http://www.blogger.com/profile/18331666332301272398</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-4245136694152797021.post-8199083749557641509</id><published>2012-08-31T18:48:00.002+08:00</published><updated>2012-08-31T18:48:45.619+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Fedora"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Fedora 安裝完的小筆記</title><content type='html'>這是從網路上找到的資源，並記載在這邊的 Fedora 小筆記：&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.&amp;nbsp;先關閉 DHCP Server, 然後參考這篇設定固定 IP：&lt;br /&gt;
&lt;a href=&quot;http://linux988.pixnet.net/blog/post/25742105&quot; target=&quot;_blank&quot;&gt;http://linux988.pixnet.net/blog/post/25742105&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
2. 安裝並設定 Apache Server，參照鳥哥：&lt;br /&gt;
&lt;a href=&quot;http://linux.vbird.org/linux_server/0360apache.php#www_basic_basic&quot; target=&quot;_blank&quot;&gt;http://linux.vbird.org/linux_server/0360apache.php#www_basic_basic&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
3. 重啟 Apache Server：&lt;br /&gt;
apachectl -k restart&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://rainstingtw.blogspot.com/feeds/8199083749557641509/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://rainstingtw.blogspot.com/2012/08/How-to-set-up-Fedora.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/8199083749557641509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/8199083749557641509'/><link rel='alternate' type='text/html' href='http://rainstingtw.blogspot.com/2012/08/How-to-set-up-Fedora.html' title='Fedora 安裝完的小筆記'/><author><name>Rainstring</name><uri>http://www.blogger.com/profile/18331666332301272398</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-4245136694152797021.post-9000961136529891564</id><published>2012-07-18T11:06:00.001+08:00</published><updated>2012-07-18T11:07:02.874+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="程式應用"/><title type='text'>用批次檔來管理 add or delete route</title><content type='html'>公司的網路需要額外做一些設定，因此寫了個批次檔來 add 與 delete route&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; background: white; border-width: .1em .1em .1em .8em; border: solid gray; color: black; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;route delete 0.0.0.0
route ADD 172.0.0.0 MASK 255.0.0.0 172.21.32.254
route ADD 0.0.0.0 MASK 0.0.0.0 192.168.99.1
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
要注意的是：檔名不能取成 route.bat ，否則 route 本身會不斷 call 本身而造成無限循環。&lt;br /&gt;
當發生此狀況時，改存成 route_change_bat 即可避免此一現象。</content><link rel='replies' type='application/atom+xml' href='http://rainstingtw.blogspot.com/feeds/9000961136529891564/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://rainstingtw.blogspot.com/2012/07/route-add-delete-by-bat.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/9000961136529891564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/9000961136529891564'/><link rel='alternate' type='text/html' href='http://rainstingtw.blogspot.com/2012/07/route-add-delete-by-bat.html' title='用批次檔來管理 add or delete route'/><author><name>Rainstring</name><uri>http://www.blogger.com/profile/18331666332301272398</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-4245136694152797021.post-3562211234404617766</id><published>2012-07-11T18:10:00.001+08:00</published><updated>2012-07-11T18:10:47.360+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="程式應用"/><title type='text'>[筆記] 個人覺得好用的程式清單</title><content type='html'>&lt;br&gt;
&lt;br&gt;
此篇簡單整理一下我平時在用的程式，&lt;br&gt;
包括工作用與日常生活用的（免得以後忘記）。&lt;br&gt;
&lt;br&gt;
如果有什麼推薦的也請大家不吝分享：）&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://rainstingtw.blogspot.com/2012/07/tools-what-i-like-to-use.html#more&quot;&gt;閱讀更多 »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://rainstingtw.blogspot.com/feeds/3562211234404617766/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://rainstingtw.blogspot.com/2012/07/tools-what-i-like-to-use.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/3562211234404617766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4245136694152797021/posts/default/3562211234404617766'/><link rel='alternate' type='text/html' href='http://rainstingtw.blogspot.com/2012/07/tools-what-i-like-to-use.html' title='[筆記] 個人覺得好用的程式清單'/><author><name>Rainstring</name><uri>http://www.blogger.com/profile/18331666332301272398</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>