Thursday, October 15, 2009

Using whois To Search For Records

Here's a nice tip to search for relevant records from a DNS using whois:
whois -h "" -a "Google"
 This will search "" for all records matching "Google".  Good stuff :)

Sunday, October 11, 2009

Installing Virtualbox Guest Additions in Centos 5

To install VBox's Guest Additions in CentOS 5, simply run the following commands:
yum install gcc -y
yum install kernel sources -y
yum install kernel-devel -y
Reboot the system. Right after that, run the VBox additions .sh file.

Friday, October 9, 2009

XML Pretty Formatting

I've had this problem for a long time. A huge XML document which is not formatted. Finally found the simplest solution... HTML Tidy library. Grab the EXE from SourceForge: Then run the following command:
tidy -xml -indent -quiet -o "output.xml" input.xml
This will read the input.xml file and treat it as a well formed XML. No additional output will be displayed on screen. Output file will be written to output.xml.

This thing is *fast*. It parsed an 8MB XML file within seconds.

Man... Don't know why I didn't figure this out earlier... Sheshh...