This is a firefox extension which allows you to add, modify, remove and disable keyboard shortcuts for Firefox. We're going to use this to disable the pesky shortcut for quitting firefox which is Ctrl-Q. Ctrl-Q is right next to Ctrl-W which is the handy shortcut for closing tabs, and if you hit it by mistake your entire session will be lost; sometimes it vanishes so quickly you don't even know what hit you.
Simply install the extension, restart Firefox, and then open Preferences for keyconfig in the Add-ons section. Then scroll down and highlight the shortcut for Quit and click disable. Voila, no more Ctrl-Q rage.
This extension was created by dorando, and can be found here: http://forums.mozillazine.org/viewtopic.php?t=72994 and here: http://mozilla.dorando.at
According to the forum post linked above, you can support the creator of this extension by donating something towards his hosting bill here: http://www.dreamhost.com/donate.cgi?id=3048
Since this extensions works so well for many people and the only trace of it seems to be a forum post, I've decided to host a mirror of it on my server, just in case. You can find that here: http://conjurecode.com/keyconfig.xpi