2010年5月18日 星期二

Meld - Diff and merge tool


gtags & htags (trace code)


1. $ sudo apt-get install global
2. $ cd
3. $ gtags
4. $ global (find definition of pattern)
5. $ global -r (find references of pattern)
6. $ global -x (shows the detail)
7. $ global -xg (locates the lines which have specified pattern)


* Not work with VIM, use the above commands under SHELL
reference: http://www.gnu.org/software/global/globaldoc.html


使用 htags
使用編輯器閱讀源碼,可以直接編輯。也可使 用內含的 htags 編成 HTML,結果會放在 ./HTML 裡面。
$ htags --suggest
s: 加入 object definitions, references, symbols
a: 依照字母順序處理 function index
n: 加入行號
o: 除了 binary files 外,源碼以及其他文字檔全數加入
h: 加入檔頭,
I: 使用 icon 取代文字
v: verbose

$ htags --suggest: 便利入門者,直接調用熱門選項,相當於'-afghInosTxv --show-position'


2010年5月14日 星期五

VirtualBOX 分享資料夾設定

* 客端作業系統為Windows時:當你在功能表列 上選取裝置→安裝客端額外功能,他就會開始安裝,直到結束。他就會將相關的虛擬驅動程式安裝完成,定打開主客間很重要的資料夾分享的功能,在使用手冊上說 明你可以在命令提示字元上輸入net use x: \\vboxsvr\sharename其 中”x”代表網路磁碟機的代號,你可以自選,”sharename”為你自己所設定的分享資料夾的名字,但或許你可利用檔案管理員上得的工具→連線網路磁 碟機上去做選擇可能會容易一些。

* 客端作業系統為Linux時:在功能表 列上選取和按下裝置→安裝客端額外功能後,就會掛載上一個虛擬光碟,然後利用root的權限執行VBoxLinuxAdditions.run,就會將額 外的功能來開啟。而在主客間的資料夾分享功能,在使用手冊上說明是mount -t vboxsf [-o OPTIONS] sharename mountpoint,其中”sharename”是你自訂分享資料夾的名 字,”mountpoint”是在linux裡所要掛載對應的資料夾位置,例如: /mnt/share,而在/mnt下的”share”目錄夾,你可要用root的身份去自己建立,所以你也可以自行去命名,所以自行可用如”sudo mount -t vboxsf myz /mnt/zd“。

2010年5月7日 星期五

適合程式設計的字型

Monospace/Fixed Width Programmer's Fonts有提到適合程式設計的字型重點:
  • Crisp clear characters. (清晰)
  • Extended characterset. (延伸字元集)
  • Good use of whitespace. (妥善使用空白字元)
  • 'l', '1' and 'i' are easily distinguished (能夠清楚分辨大寫 l、數字 1 以及小寫 i)
  • '0', 'o' and 'O' are easily distinguished (能夠清楚分辨數字 0、小寫 o 以及大寫 O)
  • forward quotes from back quotes are easily distinguished -prefer mirrored appearance (能夠清楚分辨 ' 與 `,最好兩者的方向相反)
  • Clear punctuation characters, especially braces, parenthesis and brackets (標點符號要清楚,尤其是大括號、中括號與方括號)
綜合以上要點,選出了兩種符合的字型:
  • Consolas:微軟發展的新字型,內建於Vista、Office2007、Visual Studio2005等軟體。
  • Monaco:源於MAC上的字型,Return of Monaco.ttf有更多資訊。

下載: Consolas.TTF  Consolas.TTF
下載: Monaco.TTF  Monaco.TTF

Then "fc-cache -v"

2010年4月24日 星期六

開MSN出現"windows live communications platform發生問題 必須關閉 謹此致歉"



本來是以為MSN程式毀損所導致,後來重新安裝MSN狀況依舊,詳細一查原來造成故障的原因是變種Kavo病毒 (jwedsfdo0.dll),他會在Windows/system32 資料夾底下創建一個無法刪除的 jwedsfdo0.dll造成 msn9 的子程式 wlcomm.exe crash掉.       


最後用 EFIX 解掉KAVO病毒後,MSN 並可成功開啟

2010年4月23日 星期五

Wake On Lan tools for Brazilfw 2.x

http://brazilfw.com.br/downloads/addons/wol.tgz

    #ether-wake -h   
    BusyBox v1.15.2 (2009-11-24 23:32:49 BRST) multi-call binary Usage:  
    ether-wake [-b] [-i iface] [-p aa:bb:cc:dd[:ee:ff]] MAC
    Send a magic packet to wake up sleeping machines. MAC must be a station address (00:11:22:33:44:55) or a hostname with a known 'ethers' entry. Options:           
    -b              Send wake-up packet to the broadcast address          
    -i iface        Interface to use (default eth0)         
    -p pass         Append four or six byte password PW to the packet
  



Example:

 WAN使用eth0 , LAN使用eth1

經測試於brazilfw 主機下
ether-wake -i eth1 AA:BB:CC:DD:EE:FF

MAC為AA:BB:CC:DD:EE:FF之主機可成功被wake up

How to repair and clone disk with ddrescue

  ddrescue  is a tool that can be used to repair and clone disks on a  Linux system . This includes hard drives, partitions, DVD discs, flas...