Main | September 2007 »

August 2007 Archives

August 10, 2007

32bit firefox for 64bit ubuntu - all the plugins you need

I was almost tired of java, flash and other plugins I need not working on my amd64 machine with a 64-bit kubuntu installed on it, when Calvin pointed me to this link.

http://ubuntuforums.org/showthread.php?t=202537

This installs 32 bit firefox, all the dependent libraries, and all the required plugins. One stop shop. The above thread in ubuntu forums points to this script which does all that in one go.

http://home.comcast.net/~ubuntume/ff32-3in1-5.tar.gz

Just be root when you run the script.

Firefox - rediscover the web.

custom keywords in firefox

How do you get work done faster? By typing less -

My requirement was to jump to a specific url in bugzilla given a bug number, and it would be nice - if you can just type "bug 1122" in the address bar and it jumps to the url http://bugzilla.domain.com/show_bug.cgi?id=1122

I realized today, that, it is a feature in firefox which I had not noticed until now. It is called "Keyword Searches"

The feature enables you to define a "keyword" for a bookmark which has a "%s" in it for substitution.

Now, my bookmark will look like http://bugzilla.domain.com/show_bug.cgi?id=%s, and the bookmark itself has the keyword "bug"

More information at the mozilla knowledge base

August 17, 2007

Javascript array sort with custom comparators

Did you know that you can write custom comparator to sort an array in javascript?

By default, it is a string sort
var arr1 = [10,1,5,4,3,2];
arr1.sort(); // 1,10,2,3,5
Say we want a numeric sort, we could write a custom comparator
function numAscending(a, b) 
{ 
    return a - b; 
}
var arr1 = [10,1,5,4,3,2];
arr1.sort(numAscending); // 1, 2, 3, 4, 5 10

August 30, 2007

revelation: embedded images in html

Did not know I could ship the entire image embedded in html - encoded in base 64.
View source on this page and see how Powerd by apache image is shown!

eg:
< img src="data:image/gif;base64,
BINARY DATA HERE" />



Ref: http://www.unixreview.com/documents/s=8217/ur0305h/

About August 2007

This page contains all entries posted to Vinay Srini in August 2007. They are listed from oldest to newest.

September 2007 is the next archive.

Many more can be found on the main index page or by looking through the archives.