If you are an Internet junkie like me, here is a list of the 2009 Webware winners.
 http://www.cnet.com/html/ww/100/2009/winners.html?tag=newsLeadStoriesArea.1 .
You will recognize a lot of the names and might also discover some new cool sites.
If you are an Internet junkie like me, here is a list of the 2009 Webware winners.
 http://www.cnet.com/html/ww/100/2009/winners.html?tag=newsLeadStoriesArea.1 .
You will recognize a lot of the names and might also discover some new cool sites.
Say you need to sudo as a particular user and run a command and at the same time you need to pass an environmental variable to the command, you can do it by passing the command in doublequotes.
For example, I want to start Oracle while I am logged in as another user (vinay), I can start the database using dbstart by issues
"sudo su - oracle -c "dbstart /$ORACLE_HOME"
$ORACLE_HOME is an environmental variable listed under user oracle’s environment.
Needless to say, you need to ensure that you have sudo configured to allow your userID to su to oracle.
If you want to redirect the default home page on Jboss (which has links to the Jboss site and also the JMX Console), you can do it by editing the index.html file in
$JBOSS_HOME/server/$INSTANCE/deploy/jboss-web.deployer/ROOT.war.
The $INSTANCE is the mode you are running Jboss in (default, all, messaging etc).
For my reference.. good article about command line usage of grep . http://arstechnica.com/open-source/news/2009/05/command-line-made-easy-five-simple-recipes-for-grep.ars . Older how to articles on my site related to this topic are here and here.
If your website is a target of web scrapers (http://en.wikipedia.org/wiki/Screen_scraping), here’s a simple way to keep them on their toes..
Every few days (or weeks) make a small change to the web page format. The trick is to make the change in such a way so that your users do not notice it or are not annoyed by the change. Most of the simple scrapers use, screen scraping and this would confuse the hell out of them 🙂 and usually deters the most abusive ones. The smart ones would have approached you in the first place, requesting permission to scrape or get authorized for an interface.
If you have ever worked in an IT shop, you will know that the one thing you cannot escape from is issues related to Database performance. Now, I am no DBA in any way or fashion, but thought I should record some of the common issues and ways they have been overcome in my career so far. More for self records than trying to teach someone :).
Did you run into any strange situations and figured out a solution? Please feel free to add your comments below…
I have been looking at getting an e-book reader for some time now (yes.. even though I don’t have time, I still like to think I can read 🙂 ).. My sister and brother in law surprised me by getting me the newly released Kindle 2.0 (Thx Guys!!).. I think I am one of the first few people to receive it!!. Here are some pictures of the unpacking and the device itself
The Kindle in it’s original packing.. Getting pretty close to being as cool as Apple packaging

The most amazing thing (for me).. the USB/Power Cable.. Look how small the power brick is!!


Â
First Thoughts??
Since, I didn’t have a previous e-book or the Kindle 1.0, I don’t have anything to compare it to. I think the styling of the device is very sleek and sexy. I like the alumunium backend (Reminds you of the first gen iPhone). The interface is OK.. Was not very impressed with it. I love the fact that you can browse Wikipedia anytime/anywhere with the built-in wireless connection for free!!
My next task is to figure out a way to get some content onto this baby. There are several books in the public domain (like the ones on Gutenberg.org) that I would like to get onto the Kindle first. Once, I feel comfortable with the unit, I will try some e-books from the Kindle store.
Nothing fancy.. but here is a simple perl script to open a file, search for specific content in the a line and replace it with some other content.
open (SOURCE, "< source.xml")
or die "Could not open file source.xml: $!\n";
open (DESTINATION, ">modfile.xml")
or die "Could not open file modfile.xml: $!\n";
while (defined($line =
if ($line =~ m/YYYYYYYY/i) {
$line = "XXXXXXXXXXXXXXXXXXX\n";
}
print DESTINATION "$line";
}
close (SOURCE);
close (DESTINATION);
You are opening a file named source.xml, reading every line and if there is some text that matches “YYYYYYYY”, you are replacing the whole line with “XXXXXXXXXXXXXXXXXXX”. I am sure there are more elegant ways to write this :).. but this will do the trick too..
Quick note to myself.. If you have a high volume transactional database and are looking to purge data from a table(s).. make sure you purge the data in small chunks. If you purge the data in larger chunks (rows), other processes trying to access the data on those tables have to go to the redo logs to access the data, since the purge job will put a lock on the table. This obviously adds latency to the queries.. So purge the data in smaller chunks (rows), forcing the database to flush the redo logs.
SourceForge.net is an online community supporting open source projects by providing hosting, distribution and subversion services. They choose a project every month from the hundreds of thousands of projects that are hosted on SourceForge based on popularity and activity. Most of the projects are the who is who of the Open source community. This is a good link to bookmark.. http://sourceforge.net/community/index.php/potm/