Apr 2 2010

Setting up Apache HTTPS/SSL on Windows

I am assuming that you already have Apache2 installed and working on a Windows server.

For SSL/HTTPS to work you need to download and setup the Win32 Binary including OpenSSL "httpd/apache_x.x.x-win32-x86-openssl-x.x.x.msi" on your Windows server.

If you now have regular HTTP server working follow the guide below to setup HTTPS.

Continue reading

Mar 26 2010

IE8 addEventListener Alternative Example

The W3C DOM Level 2 Event Model specifies addEventListener as the standard way to register event handlers but IE doesn’t support addEventListener. Instead IE provides an alternative attachEvent method for that purpose.

It does exactly the same thing but Microsoft decided to create their own method for the same purpose.

An example is given below shows how to provide cross browser compatibility for addEventListener:

someElement = document.getElementById('divName'); 


// for IE compatability

if (!someElement.addEventListener) {

    someElement.attachEvent("onclick", someFunction);


else {

    someElement.addEventListener("click", someFunction, false);


Please feel free to post other alternatives, if you know.

Mar 23 2010

Disabling Quicktime as Firefox Default mp3 Player

If you have Quicktime plugin for Firefox, annoyingly enough, Quicktime takes control and becomes the default mp3 player for your browser and leaving no option whatsoever to change the default mp3 player. Even if you change the  Tools -> Options -> Applications settings to change the default player, it will have no effect as Quicktime has already Hijacked this setting from users.

Now, we go brute force and restrict these kind of plugins to take such controls in the future:

  • Go to about:config
  • Type ‘plugin’ in the filter box (minus quotes)
  • Look for ‘plugin.disable_full_page_plugin_for_types’
  • If it already exists and contains a value, add ‘,audio/mpeg’ to the end of it, otherwise just change the value to ‘audio/mpeg’
  • Fully close Firefox, wait a few seconds for it to clean up and die
  • Launch Firefox again.. click an MP3 link..

voila! it does whatever you’ve specified in your Firefox Options -> Applications.

Oct 3 2009

iPhone – Manually Backup SMS, Notes, Pictures, Video, MxTube Folder

iTunes although does a great job backing up all the data which you can restore at any time if you have issues but if you are upgrading hardware, i.e. 3G to 3GS or a major OS update like version 2.x to 3.x, restoring from old stuff may often create unnecessary legacy files left on the system, slowing up the OS or in some cases may also contribute to battery depletion issues (This has not been confirmed yet but there might be some conflicts in the system that might cause faster depletion of battery).


So the best way to get started with your brand new system would be to connect to iTunes and select “Setup as new”  instead of “Restore from backup”. This will ensure that you have a fresh and clean system running without any kind of conflicts going on in the background.

Before you do “Setup as new” phone you will need to backup your important files/data. The process of backing up your data described below is a manual backing up procedure and would require you to have SSH access to your iPhone. If you know what I am talking about go ahead and proceed at your own risk. Backup these following folders so that later you can restore them manually after you have your new System up and running. In most cases it will be a very easy Copy/Paste operation of the following folders after you SSH to your iPhone. Continue reading

Aug 14 2009

Compressing a Servlet Project into a .war file

In order to compress a ‘pets’ servlet/web application/project into a "Web Archive" file named pets.war which can easily be imported in Eclipse or other IDE”s or can easily be transported to another server, Execute the following commands in the terminal:

Continue reading

Aug 4 2009

Resource Needed for JDBC Connection Pooling Support

In order to get JDBC working with Connection Pooling Support, you will need to add the latest version of the following files to your Library:

Put the above files in your WEB-INF/lib folder and let your IDE(Eclipse) know the existence of of the above files.

You will also need to add the following imports at the the top of files where you want access to CPDS:

  • import org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS;
  • import org.apache.commons.dbcp.datasources.SharedPoolDataSource;

Jun 28 2009

OSx86 – Changing Default Kernel

wiki.pngOSX by default uses a kernel that is placed in the root directory "/" and loads from a file named "mach_kernel".

So in order to replace the default kernel, all you have to do is to replace that file with your own kernel file. But remember, the kernel you are replacing with must be compatible with your current system otherwise you will not be able to boot.

In my case, I have several kernels in my root directory anv, voodoo, kabyl, and vanilla. I would like "anv" to my default kernel. To do that open the terminal and type following command’s :

Continue reading

Feb 11 2009

Guide to Running Apache on Windows or Ubuntu

After using IIS for almost 4 years now, I have decided to give up on IIS for so many of its limitations.

Among one of those limitations was the inability to use “pretty permalink” or the mod-rewrite feature which comes built in with Apache. Although IIS 7 seems to have a plan to include similar sort of functionality but waiting for that to come and who knows how many more problems along with it, is just not worth waiting for. Its just more easier to get Apache running on your machine and get everything that IIS gives and much more. Continue reading

Page 1 of 11