2009-01-14

CPAN Reinitialization

cpan> o conf init

2008-12-16

How to Change the Ephemeral Port Range

Linux allows you to view and change the ephemeral port range by simply using the file /proc/sys/net/ipv4/ip_local_port_range. For example, this shows the default configuration on a kernel 2.2 system:

$ cat /proc/sys/net/ipv4/ip_local_port_range
1024 4999

To change this to the preferred range, you could do (as superuser):

# echo "49152 65535" > /proc/sys/net/ipv4/ip_local_port_range 

2008-12-15

Thunderbird Add-on

  • Buttons!
  • Google Contacts
  • MinimizeToTray
  • Send Later
  • Message Filter Import/Export

2008-10-28

Install Ubuntu 8.04 from Hard Disk

  • Make an ISO file ubuntu804.iso from Ubuntu's LiveCD (8.04 desktop), put the ISO file in D:/ubuntu804.iso
  • Mount the ISO file or the LiveCD, copy two files CDROM:/casper/{initrd.gz,vmlinuz} to Windows drive D:/
  • Download grub4dos, extract its files to C:/
  • Edit C:/boot.ini, add one new line: C:\grldr="GRUB4DOS"
  • Edit C:/menu.lst
    title Find and Install Ubuntu
    find --set-root /ubuntu804.iso
    kernel /vmlinuz boot=casper iso-scan/filename=/ubuntu804.iso
    initrd /initrd.gz
  • Reboot Windows XP
  • Select GRUB4DOS from the boot menu
  • ... ...
  • Will boot to the same screen as if you're directly booting from the LiveCD.

2008-10-14

Less' history file

偶然发现看 man page 的时候 search 过的字符串是有 history 的, 猜想是 less 的功能, 查了一下根目录下的文件, 发现有一个 .lesshst, 查 less 的 manual, 里面有说到 .lesshst:

. . . Name of the history file used to remember search commands and shell commands between invocations of less. . .

2008-10-13

Compile GNU screen from source

  • $ git clone git://git.savannah.gnu.org/screen.git
  • $ cd screen/src
  • $ aclocal --force
  • $ libtoolize --copy --force
  • $ autoconf --force
  • $ autoheader --force
  • $ automake --add-missing --copy --force-missing
  • $ ./configure --prefix=/usr/local/screen-dev --enable-colors256
  • $ make && make install
N.B.: Run mktar.pl to make traditional screen-X.X.X.tar.gz

See full screen man pages on Fedora Core 3

ubuntu 6.06 上看 man pages 的时候能全屏显示, 但 Fedora 3 上却不能, 研究一番, 可以自己编译 man-db 来解决:

编译 man-db 可能需要依赖 gdbm-devel 或者 db4-devel (ubuntu 上对应 libgdbm-dev 或者 libdb-dev).

2008-08-29

Expect 5.43 takes quite long when exiting

Expect 5.43 的 script 结束时总是很慢, 用 expect -d 发现最后有条 message:

write() failed to write anything - will sleep(1) and retry...
查了下 code, 在 exp_chan.c : ExpOutputProc() 中有个 sleep(1), 把它换成 usleep(10 * 1000) 就好了.

2008-08-01

Yahoo + Del.icio.us

原来 Del.icio.us 是 Yahoo 的了, 而且改名为 Delicious.com 了.

2008-07-31

Hotspot Shield

Public networks (both wired and wireless) are great. After all, what would life be without connecting while at airports, hotels and coffee shops? However, the danger to your personal data exists even if you connect to a fee based open network. Your passwords, credit card numbers, and any data you send can be seen and associated with you personally. Standard antivirus software won't protect you as this threat is on the network, not your laptop or iPhone.

That's why AnchorFree is pleased to offer Hotspot Shield. Our application keeps your Internet connection secure and anonymous on public networks.

2008-07-09

Project Management

  • ITIL - Information Technology Infrostructure Library
  • PRINCE2 - Projects in Controlled Environments

2008-07-08

Google's Protocol Buffers

Interactive Tclsh: auto_noexec

If set to any value, then unknown will not attempt to auto-exec any commands.

SEE ALSO: auto_execok(n)

2008-07-02

DNS Servers

2008-06-30

2008-06-28

256 color terminals

  • PuTTY 0.60: Settings > Window > Colours > Allow terminal to use xterm-256color mode
  • Ubuntu 6.06: apt-get install ncurses-term
  • Set TERM=xterm-256color
  • Compile screen: configure --enable-colors256
  • Edit .screenrc:
# terminfo and termcap for nice 256 color terminal
# allow bold colors - necessary for some reason
attrcolor b ".I"
# tell screen how to set colors. AB = background, AF=foreground
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
# erase background with current bg color
defbce "on"
  • Start screen: screen -T xterm-256color
References: 256 color emacs + putty, 256 color xterm (including some 256 color schemes for vim)

Sources for Time Zone and Daylight Saving Time Data

Sources for Time Zone and Daylight Saving Time Data

`expect -D 1' works for 5.41

Expect 5.42.1 和 5.43 的 -D 1 参数一直不能正常工作, 郁闷很久, 找了一个 5.41 编译了一下, 却是好的, 看来是 5.41 之后的修改有问题吧.

Red Hat Liberation Fonts - Free

在 WinXP 上, Liberation Mono (and Bold) 10 号字体跟 Windows 的 Fixedsys 大小相当.

2008-06-27

Webmin

Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like /etc/passwd, and lets you manage a system from the console or remotely. See the standard modules page for a list of all the functions built into Webmin, or check out the screenshots.