顯示包含「應用軟件」標籤的文章。顯示所有文章
顯示包含「應用軟件」標籤的文章。顯示所有文章

2009年9月22日星期二

VIM cctree config

cctree.vim + cscope provide a very good source code tracing, but the default key map ctrl+'\','>' or '<' is really too much for me.
I just add the following line to CCTreeBufferKeyMappingsCreate in cctree.vim , which only use ctrl+'f', 'r', 'a', 'q'. These hot keys may crash with anothers, but it is suitable for me.

exec 'nnoremap :CCTreeTraceReverse ='.func_expr.''
exec 'nnoremap :CCTreeTraceForward ='.func_expr.''
nnoremap :CCTreeRecurseDepthPlus
nnoremap :CCTreeRecurseDepthMinus

2009年8月10日星期一

setup my basic ubuntu

download latest ubuntu ISO image
$sudo passwd root
#apt-get install samba
edit /etc/samba/smb.conf
#smbpasswd -a
#apt-get install nfs-common
#apt-get install nfs-kernel-server
add /mnt/iso *(ro,sync) to /etc/exports
#apt-get install subversion
#apt-set install ssh
#apt-get install build-essential
#apt-get install libncurses5-dev
#apt-get install tofrodos
#apt-get install xinetd tftpd tftp


/etc/xinetd.d/tftp

service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot
disable = no
}

2009年8月5日星期三

color the shell

Put this in the home directory ~/.bashrc

# enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
[ -e "$HOME/.dircolors" ] && DIR_COLORS="$HOME/.dircolors"
[ -e "$DIR_COLORS" ] || DIR_COLORS=""
eval "`dircolors -b $DIR_COLORS`"
alias ls='ls --color=auto'
fi



Create a file .dircolors to include the following, where I have to set
DIR 07;31;47, which means, reverse, background color is red, text color is white.
Then it is easy to differenate a directory or normal file.



# Configuration file for dircolors, a utility to help you set the
# LS_COLORS environment variable used by GNU ls with the --color option.

# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the
# slackware version of dircolors) are recognized but ignored.

# Below, there should be one TERM entry for each termtype that is colorizable
TERM linux
TERM linux-c
TERM mach-color
TERM console
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM dtterm
TERM xterm
TERM xterm-color
TERM xterm-debian
TERM rxvt
TERM screen
TERM screen-w
TERM vt100
TERM Eterm

# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
NORMAL 00 # global default, although everything should be something.
FILE 00 # normal file
DIR 07;31;47 # directory
LINK 01;36 # symbolic link. (If you set this to 'target' instead of a
# numerical value, the color is as for the file pointed to.)
FIFO 40;33 # pipe
SOCK 01;35 # socket
DOOR 01;35 # door
BLK 40;33;01 # block device driver
CHR 40;33;01 # character device driver
ORPHAN 40;31;01 # symlink to nonexistent file

# This is for files with execute permission:
EXEC 01;32

# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
# (and any comments you want to add after a '#')

# If you use DOS-style suffixes, you may want to uncomment the following:
#.cmd 01;32 # executables (bright green)
#.exe 01;32
#.com 01;32
#.btm 01;32
#.bat 01;32

.tar 01;31 # archives or compressed (bright red)
.tgz 01;31
.arj 01;31
.taz 01;31
.lzh 01;31
.zip 01;31
.z 01;31
.Z 01;31
.gz 01;31
.bz2 01;31
.deb 01;31
.rpm 01;31
.jar 01;31

# image formats
.jpg 01;35
.jpeg 01;35
.gif 01;35
.bmp 01;35
.pbm 01;35
.pgm 01;35
.ppm 01;35
.tga 01;35
.xbm 01;35
.xpm 01;35
.tif 01;35
.tiff 01;35
.png 01;35
.mpg 01;35
.mpeg 01;35
.avi 01;35
.fli 01;35
.gl 01;35
.dl 01;35
.xcf 01;35
.xwd 01;35

# audio formats
.ogg 01;35
.mp3 01;35
.wav 01;35

2009年8月3日星期一

壽仔派息3

8月3日收到2628股息接近五千元,好慘呀!我上年..估2萬=_=!真係笑死人
無計啦..派息由0.42跌去0.23..我真係估唔到!
而且我明明股數多左一倍,但係上年差唔多五千今年又係得五千>_<
下年千祈唔好又係得五千呀>_<
如果股息係咁得五千又五千,五千又五千,幾時先五萬呀?

0.05->0.14->0.42->0.23
下年要多返d派息呀!=____________________________=

2009年8月1日星期六

VIM , ctags and supertab

唔知大家用咩editor去寫programme,ultraedit?source insight?呢d都係要俾錢,雖然有得crack,但係唔好用,唔夠快!小弟數年前有人介紹vim我用,個位人兄就係mike少,唔知佢仲有無用或者仲係未好懶咁用呢..哈哈.....我都懶用嫁,只不過好既plugin就一定要用!咁0岩轉工都要執下,順便係度介紹下啦!

plugin:
bufexplorer.vim
getscriptPlugin.vim
gzip.vim
matchparen.vim
minibufexpl.vim
netrwPlugin.vim
rrhelper.vim
ShowFunc.vim
spellfile.vim
supertab.vim
taglist.vim
tarPlugin.vim
themes.vim
tohtml.vim
vimballPlugin.vim
zipPlugin.vim


當中taglist.vim 同supertab.vim 好用到不得了。

taglist.vim 跟ctags 一起用,裝好ctags,
$ ctags -R ./
把cursor移到variable,function,marco name,按下
'ctrl'+']'
就會跳去declartion
'ctrl'+'t'
就會返回。

supertab.vim
只要按一下'tab',就會自動幫你完成長長的variable/function/marco name.....
就好似係shell 按'tab'完成file名 一樣..真係好正呀!@0@

常用command
:Tlist
:set fileformat=unix
:WMToggle
ctrl+w s

最喜愛的color scheme
metacosm.vim


小弟的_vimrc
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin

set diffexpr=MyDiff()
function MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
let arg1 = v:fname_in
if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
let arg2 = v:fname_new
if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
let arg3 = v:fname_out
if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
let eq = ''
if $VIMRUNTIME =~ ' '
if &sh =~ '\ let cmd = '""' . $VIMRUNTIME . '\diff"'
let eq = '"'
else
let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
endif
else
let cmd = $VIMRUNTIME . '\diff'
endif
silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
endfunction
colorscheme MetaCosm

let g:Tlist_Auto_Open = 1
let g:showfuncctagsbin = 'E:\work\Ctags.exe'

2009年7月26日星期日

QDIR color highlight, file filter



因為成日都將d file 抄來抄去, copy and paste , window's file explorer 又唔好用,
所以介紹過Total Commander,其實我覺得都夠用。
不過最近好似好多人用QDIR,咁我就試下啦,用用下又ok喎!其中filter同color highlight同 file filter我覺得幾方便,可惜佢無做到ftp,反而total commander 有,唉...成日都無得兩全其美.......

本身color filter係disable, 要自己enable返:
run->add->color->user color-filter

file extenstion filter都係 disable, 下邊有個icon
->be a filter

我覺得有用既feature by default 要俾人用先得嫁!好野唔俾人用,有鬼知你好咩..

2009年7月13日星期一

install viewvc

According to the installation guide,
http://viewvc.tigris.org/source/browse/*checkout*/viewvc/trunk/INSTALL

#apt-get install python-subversion

is missing

and we need to generate a password file
#htpasswd -c /usr/local/etc/password

2009年7月5日星期日

download youtube video

好方便!
http://keephd.com/

2008年12月28日星期日

Total Commander

如果你係window經常
-copy/move/delete file
-ftp
-有很多network,usb drive
-啓動某些程式
...

Total Commander 係一個好好的幫手~
自己去download來玩啦~~
http://www.ghisler.com/