Mount an ISO image under Linux

$ sudo -s

# mkdir -p /mnt/disk

# mount -o loop disk1.iso /mnt/disk

# cd /mnt/disk

# ls -l

Use Rsync to Backup Data

Reference: http://www.mikerubel.org/computers/rsync_snapshots/

Below is a backup script for backing up /home to /mnt/usb1/backup using rsync.

Rip DVD Audio to MP3 or OGG

This article on ubuntugeek gives a nice tutorial on how to rip DVD audio to mp3 or ogg.

Besides apt-get, the packages lsdvd and transcode are available in yum and portage as well.

Install Net::Packet

We were not able to install the CPAN module Net::Packet. The error messages indicated that it could not find Net::Libdnet module.

Next, we tried to install Net::Libdnet, but got the error "Libdnet.xs:37:18: error: dnet.h: No such file or directory". That means, we are missing a libdnet.

So, we installed libdnet through yum (from "epel" repos):

# yum install libdnet libdnet-devel

("epel" repos is the Fedora extra package repos).

Understanding GFW

This blog http://gfwrev.blogspot.com has some study result on GFW. It's in Chinese. Maybe oneday we will find some time and translate some of it into English.

Perl Socket Shutdown and Close

This discussion http://www.perlmonks.org/?node=108244 explains nicely that we need to do shutdown and close after we are done with a socket:

shutdown on a socket is similar to close on a pipe in what information it gives to the program on the other side. But it does not close the file handle.

Screenshot: Untrust CNNIC from Mac OS's Keychain Access

If you use Firefox/Thunderbird in Mac OS, you still need to untrust the CNNIC certs follow the steps in Screenshot: Remove CNNIC from Firefox and Thunderbird.

In Mac OS X: Click Applications -> Utilities -> Keychain Access -> Certificates -> (expand with V button below) -> System Roots -> (Unlock, top left) -> Double-click the cert -> Trust -> When using this Certificate -> Never Trust.

Screenshot: Remove CNNIC from Firefox and Thunderbird

Instead of removing CNNIC certificates from your system, we should mark them as "untrusted". This way, when your system updates its cerficates, they will not slip in. As a precaution, you might need to form the habit of checking the trusted certficates installed in your system periodically.

WWW::Curl

I tried to install this module WWW::Curl via cpan, but failed on both Centos 4 and Centos 5. Instead of digging for the fix, I just enabled rpmforge repository, and installed through yum:

# yum install perl-WWW-Curl

Remove CNNIC CA

Mozilla and Microsoft have added CNNIC root CA to the browser's Authorities and CA directory. Chinese users are in a rush removing them from their computers. Here is a post on how to do it (in Chinese).

Discussions can be found here: