Monday, January 26, 2009

Terminate a process in linux

Sometimes it is necessary to terminate a process (typically a browser) forcefully due to some malicious website which causes that the browser can not be normally closed.

$> ps -A % show all the current process as well as the PIDs;

$> kill PID % replace PID by the PID number found in the last step.

Labels:

Saturday, January 24, 2009

Some Latex Tricks

1. Difference between itemize, enumerate and description:

Example: If issuing \item[(a)], the left bracket will go outside of the left margin for the first two environments. I was shocked that there is no such issue for the description environment.

2. Add a dot after the chapter/section/subsection number:

3. Add a dot after the theorem/corollary/proposition numbering:

4.

Labels:

Saturday, January 10, 2009

Jokes

1.  
很久墨收到你的信息
俺很心疼
俺想到死
曾用薯片割过脉
用豆腐撞过头
用降落伞跳过楼   
用面条上过吊
可都墨死成   
你就请俺吃顿饭
撑死俺算了


2.
表演系排小品。  
男生:“本来咱俩这事儿好好的,都是让你妈给逼的。”  
女生:“是你妈逼的!”  
男生:“你妈逼的!”  
女生:“你妈逼的!!”  
男生:“去你妈的,不排了,不排了,这叫什么台词儿啊?!!”

3.
如果感到心里挖凉挖凉的,
请拨打俺的电话!
谈感情请按1,
谈工作请按2,
谈人生请按3,
给俺介绍对象请按5,
请俺吃饭请直说,
找俺借钱请挂机。     

4.
长颈鹿嫁给了猴子,
一年后长颈鹿提出离婚:
我再也不要过这种上蹿下跳的日子了!
猴子大怒:
离就离!谁见过亲个嘴还得爬树的!

5.
你都长大了,有些事应该让你知道了:
天,是用来刮风下雨的;
地,是用来长花长草的;
我,是用来证明人类是多伟大的;
你, 是用来炖粉条的。     

6.
在铁路旁大号却没带纸时,
别着急,
火车会提醒你:裤擦,裤擦,裤裤擦!
在河边上大号却没带纸时,
别着急,
青蛙会告诉你:棍刮,棍刮,棍棍刮!

7.
黑猩猩不小心踩到了长臂猿拉的大便,
长臂猿温柔细心地帮其擦洗干净后它们相爱了,
别人问起它们是怎么走到一起的?
黑猩猩感慨地说:
猿粪!都是猿粪啊!

8.
尊敬的用户,
此时我们已从您的话费中扣除20元献给巴勒斯坦民族解放事业,
为此巴自治政府决定以全体阿拉伯世界的名义授予您崇高的称号:
本.沙勒巴基!

9.
听说过吗?
前世的五百次回眸,
才换得今生的一次擦肩,
象你我这样亲密的朋友,
上辈子似乎没干什么,
光他妈回头了!

10.
你的人生写照:
十岁学会自己洗澡——猪自清;
二十岁光彩照人——猪时茂;
三十岁找到工作——猪立业;
四十岁雇了佣人——猪得佣;
五十岁学会打篮球——猪投!

11.
一男要跳楼,
其妻大喊道:
亲爱的别冲动,我们的路还长着呢!
男子听后,嗖地跳了下去......
police说:你真不该这样威胁他!

12.
传说你可狠了,
在戏院里横躺着占四个座位,
别人叫你起来,
你却只哼哼两声不动地方,
保安来了说:朋友够狠,哪条道上的?
你咬牙说:楼上过道摔下来的!

Labels:

Thursday, January 01, 2009

Modifying the Linux Grub boot loader's options

See here.

The following is an example grub.conf file

# grub.conf generated by anaconda
# Note that you do not have to rerun grub after
# making changes to this file
# NOTICE: You do not have a /boot partition.
# This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,2)
# kernel /boot/vmlinuz-version ro root=/dev/sda3
# initrd /boot/initrd-version.img
# boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,2)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.23.9-85.fc8)
root (hd0,2)
kernel /boot/vmlinuz-2.6.23.9-85.fc8 ro root=LABEL=/ rhgb quiet acpi=off
initrd /boot/initrd-2.6.23.9-85.fc8.img
title Windows
rootnoverify (hd0,0)
chainloader +1

Comment "hiddenmenue" to see the menu directly.
"timeout" could be reserved to enable the automatic
boot option.

Labels:

Check disk partition in linux

# fdisk -l,

For details, see here for example.

Labels: