星期四, 12月 30, 2010

只有sata光碟機也可以用舊的autoxp執行ghost

比較早期的autoxp光碟片不支援sata光碟機開機, 但是現在新的電腦都漸漸改成用sata光碟機了, 那autoxp光碟片開機後便無法讀取到光碟片的ghost了, 也就只能當飛盤了.
要解決這個問題, 當然最根本的就是換比較新的autoxp光碟片, 但是這要有source阿, 不是每個人都有這種管道的. 在網路上找了一些方法, 覺得方法都很麻煩, 沒有一個連電腦白痴都會用的方法, 最後我想出了一個非常簡單的方法, 就是

拿一個usb disk把ghost copy到那上面去, 然後用autoxp光碟片重新開機, 這時候就可以輕鬆地切換到usb disk中去執行ghost了, 哈哈.

奇怪的skype IE plugin竟然與windows update功能相衝

拿到公司的新電腦後, 想說來執行一下windows update安裝一些patch, 結果竟然究一直卡在windows update首頁畫面不會動. 重開電腦再執行也是一樣, 在網路上找了半天也沒找到答案. 結果問題竟然是出在skype的IE plugin, 只要把它disable就好了. 真是奇怪.

星期五, 12月 24, 2010

在colinux使用pcap-bridge網路模式

如果在coLinux中要使用pcap-bridge網路模式, 最簡單的最法就是在colinux.conf檔中加入
eth0=pcap-bride

但是, 如果需要設定網路卡的mac address, 則記得要把實體對應的網路卡名稱也加入, 否則網路不會通, 例如:
eth0=pcap-bridge,"區域連線",00:FF:67:4F:30:00

不過, colinux.conf似乎對中文的支援不是很好, 有時候會抓不到區域連線.
所以如果可以的話, 還是把區域連線改成英文, 例如: LAN
所以colinux.conf的設定就要改成
eth0=pcap-bridge,"LAN",00:FF:67:4F:30:00

星期二, 12月 14, 2010

常用Linux開發環境設定

在~/.bash_profile中加入下列設定:

alias grep='/bin/grep -n --color --exclude="*\.svn*" --exclude=tags --exclude="*\.ccache*"'
alias screen='/usr/bin/screen -e^Pp -h 10000'
#export LANG=C

在~/.screenrc中加入下列設定:
shell -$SHELL  # run the login shell

設定git環境
git config --global user.name 使用者名稱
git config --global user.email 電子郵件
git config --global color.diff auto
git config --global color.status auto
git config --global color.branch auto
git config --global color.ui auto

在Linux建立vim程式開發環境

cscope 熱鍵
curl http://cscope.sourceforge.net/cscope_maps.vim > ~/.vim/plugin/cscope_maps.vim

啟動vim的 :Tlist功能
下載taglist_45.zip
cd ~/.vim
unzip taglist_45.zip

其他設定
將下列設定加到~/.vimrc檔案中

if has("autocmd")
  filetype plugin indent on
endif

if has("syntax")
  syntax on
endif

set viminfo='10,\"100,:20,%,n~/.viminfo

autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif

set cursorline
set showmatch
set incsearch
set hlsearch
set number
set tabstop=4
set shiftwidth=4

另外,有關vim的熱鍵可以參考下列網址,還蠻詳細的喔!
http://www.lslnet.com/linux/f/docs1/i43/big5303074.htm

自己用doxygen產生API document

例如在samba source tree中, 執行下列命令

doxygen source/Doxygen

就可以看到dox/ 產生出API document