1.
安裝 vim addon 管理套件 和 vim 的 plug-ins
>sudo apt-get install vim-addon-manager vim-scripts
2.
安裝 plug-in
>vim-addons install <plug-in>
3.
查看目前有哪些 plug-in 可安裝
>vim-addons list
4.
查看目前安裝哪些 plug-in
>vim-addons
1.
安裝 vim addon 管理套件 和 vim 的 plug-ins
>sudo apt-get install vim-addon-manager vim-scripts
2.
安裝 plug-in
>vim-addons install <plug-in>
3.
查看目前有哪些 plug-in 可安裝
>vim-addons list
4.
查看目前安裝哪些 plug-in
>vim-addons
這是從 Joey 的 Who call me – kernel版 看來的
在 Linux kernel 中可以使用 sprint_symbol() 來查看函式指標指到的函式名稱和 stack 位址
用法相當簡單
假設有個加法函式
int add(int augend, int addend);
和函式指標
int (*func)(int, int);
且這函式指標指向加法函式
func = add;
接著以 sprint_symbol() 取得 func 指向的函式名稱和 stack 位址
char fname[KSYM_SYMBOL_LEN];
sprint_symbol(fname, func);
利用 printk() 就可以印出 函式名稱和 stack 位址
printk(KERN_INFO "%s\n", fname);
藉由這函式就可以很方便追蹤 kernel 的 函式呼叫流程
1.
先安裝 vconfig (vlan)
Kubuntu 9.10
>apt-get install vconfig
Lubuntu 10.04
>apt-get install vlan
2.
設 定 interface 的 vlan
>vconfig add <interface> <vlan ID>
<interface>: 網卡
<vlan ID>: 1~4094
例:
>vconfig add eth0 20
3.
啟動 vlan 並設定 IP
>ifconfig <vlan> <IP> netmask <mask> up
<vlan>: 根據 eth 和 vlan ID,若 eth 為 eth0,ID 為 1,vlan 為 eth0.1
<IP>: IP 位址
<mask>: 遮罩
例:
>ifconfig eth0.20 192.168.1.100 netmask 255.255.255.0 up
2010/05/17 13:33 修改錯誤及新增例子
查了幾個有關公告的詞,以下是自己的釋義
一般用 announcement
官方性質 proclamation, declaration
更正式、組織或政府對外用 declaration
較簡易 bulletin
可口頭或文字形式 announcement, declaration
一群人或政黨對外用 menifesto
proclamation
1. an official statement about something important that is made to the public;
the act of making an official statement 宣言;公告;聲明
noun countable uncountable
2. A proclamation is a public announcement about something important,
often about something of national importance.
announcemet
1. a spoken or written statement that informs people about something
(一項)公告,佈告,通告 countable
2. the act of publicly informing people about something (指行動)宣佈,宣告
uncountable
declaration
1. an official or formal statement, especially about the plans of a government or an organization;
the act of making such a statement 公告;宣告;宣言 countable uncountable
2. a written or spoken statement, especially about what people feel or believe
聲明(書);宣佈;表白;宣稱 countable
3. an official written statement giving information 申報(單) countable
bulletin
1. a short news report on the radio or television (電台或電視台的)新聞簡報
2. an official statement about something important 公告;佈告
3. a printed report that gives news about an organization or a group
(機構或組織的)簡報
manifesto
1. a written statement in which a group of people, especially a political party,
explain their beliefs and say what they will do if they win an election
宣言 noun
資料來源:Google 字典
要重新取得 DHCP IP很簡單,只要下以下指令即可
>sudo dhclient <interface>
<interface>: 網卡代號, 像 eth0
若是 ext2, ext3, ext4 可用 e2label 設定
>e2label <device> <label>
<device>: 裝置
<label>: 要給裝置的標籤
1.
切換目錄到 /etc/kde4/kdm
>cd /etc/kde4/kdm
2.
編輯 kdmrc
>sudo vim kdmrc
AllowRootLogin=false
改成
AllowRootLogin=true
3.
重開機
1.
點陣宋體
>sudo apt-get install xfonts-wqy
2.
正黑體
>sudo apt-get install ttf-wqy-zenhei
3.
微米黑體
>sudo apt-get install ttf-wqy-microhei
一次解決
>sudo apt-get install xfonts-wqy ttf-wqy-zenhei ttf-wqy-microhei
1.
建立磁區
>sudo cfdisk /dev/cciss/c0d1
2.
格式化為 ext4 格式
>sudo mkfs -t ext4 /dev/cciss/c0d1p1
3.
查磁區的 UUID
>ls -l /dev/disk/by-uuid
以下為顯示內容
lrwxrwxrwx 1 root root 18 2010-01-21 16:36
6374a5a6-2a58-4964-9b6e-e28a9f77c371 -> ../../cciss/c0d1p1
4.
建立掛載資料夾
>sudo mkdir /mnt/backup
5.
編輯 fstab
>sudo vim /etc/fstab
加入
UUID=6374a5a6-2a58-4964-9b6e-e28a9f77c371
/mnt/backup ext4 defaults 0 1
6.
掛載磁區
>sudo mount -a
7.
查看磁區是否已經掛載
>df -h
以下為顯示內容
Filesystem Size Used Avail Use% Mounted on
/dev/cciss/c0d1p1 34G 176M 32G 1% /mnt/backup
1.
解壓縮
>tar zxvf ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz
2.
複製 Zend Optimizer 模組
>cd ZendOptimizer-3.3.9-linux-glibc23-i386/data/5_2_x_comp/
>sudo cp ZendOptimizer.so /usr/lib/php5/20060613+lfs/
3.
編輯 php.ini
>sudo vim /etc/php5/apache2/php.ini
加入
[Zend Optimizer]
zend_extension="/usr/lib/php5/20060613+lfs/ZendOptimizer.so"
4.
重啟 apache
>sudo service apache2 restart