Download PHD Comics,XKCD and DogHouseDiaries for Offline Viewing (E-book Reader)

If you are like me who wants to read comics on kindle then this is the script for you. You can download all the comics to read it in a kindle. So here is how you do you do it. Download all the comics into 3 different folder s for each comic set by running the following scripts.

Continue reading “Download PHD Comics,XKCD and DogHouseDiaries for Offline Viewing (E-book Reader)” »


, , , , , , , ,

No Comments

Batch Insert/Update for Mysql in Java

Large inserts/Updates are a costly operation. One foolish way that I used to do is to run each update or insert query one at a time. Its incredibly slow. With most of the systems currently the latency is what is killing the performance not the CPU. Hence latency per query is really really slow. One way to speed it up is to use the Batch query in Java. It gives you the advantages of prepared statements and more over sends batch of query to mysql and there by making it incredibly fast. How fast? One by one query insert takes around 3 hours for a 8 million inserts, while batch inserts with a batch of 1000 gets done in less than 5mins. Here is the a sample code to it.

Continue reading “Batch Insert/Update for Mysql in Java” »


, , , , ,

No Comments

More than 100% CPU in top in Linux/Mac

If you are power linux/mac user you should have noticed at least once that top shows more than 100% CPU for a process. I also have seen this multiple times but always wondered how it can be. Here is an example of how my top looked when I started my java and was doing some number crunching.

Continue reading “More than 100% CPU in top in Linux/Mac” »


, , , ,

No Comments

Auto Backup using Dropbox in Linux/Mac

I had some folders on my disk which I wanted to keep a copy online as a backup and for viewing from other places. Its not always possible to save all the essentials in the drop box folder itself to be auto backed up. Thus I wrote a very small script which does this for me. All it does is read all the folders which needs to be backed up from the text file “dropboxFolders.txt” and copy them to dropbox folder. The rest is done by dropbox scripts. Hence I expect the dropbox program to be running always in the background. So here is the script:

Continue reading “Auto Backup using Dropbox in Linux/Mac” »


, ,

No Comments

User Level Threads

User level threads is created for light weight threads. It needs to be controlled, context switched and swapped by the process. To the Operating System it is only one process without any threads. Here is one implementation of it:

Continue reading “User Level Threads” »


, , ,

No Comments

Cron a Django Program

One of the issue I faced while developing a website in Django was I always had a script which collects or data which is to be in the cron. But Django usually needs a lot of configurations and settings for the environment to run. So after some searches I got that django has an undocumented API of settings which we would use of the same. So here is a file which you could include for any file you would like to run as cron and this file would do the rest.

Continue reading “Cron a Django Program” »


, , , ,

No Comments

Service Engineer/System Administrator Interview Questions

This is not my code alone.¬† It was the group effort of Vivek Ram, Cijo George, Sandeep Unni and mine during our epic preparation for Yahoo!. I am just putting it open for others who would be looking for this information. Continue reading “Service Engineer/System Administrator Interview Questions” »


, , , , , ,

4 Comments

Operator Preference Grouping Order in C

Here is a compilation of how the preference of operators are Left to Right grouping or Right to Left grouping in C. Continue reading “Operator Preference Grouping Order in C” »


, , , , ,

No Comments

Ontology Linked Data

The following is a Assignment on Ontology and Linked Data and the evolution of data which lead to the use of ontology in web. Thanks to my teammates Bharath Gowda and Sravani Thota for working on the same. Continue reading “Ontology Linked Data” »


, ,

1 Comment