Lazy Function

var foo = function() {
    var t = new Date();
    foo = function() {
        return t;
    };
    return foo();
};

Source:
http://peter.michaux.ca/articles/lazy-function-definition-pattern

Eventbug – Displaying events attached to the html nodes in Firebug

http://getfirebug.com/releases/eventbug/1.5/

FireRainbow

Syntax highlightning for Firebug
https://addons.mozilla.org/en-US/firefox/addon/firerainbow/

AceBug – ACE for Firebug console

A nice plugin which provides some functionality from Ajax.org ACE editor in the Firebug console
https://addons.mozilla.org/en-US/firefox/addon/acebug/

Adding something to $PATH

Type in the console:

export PATH=$PATH:/new_path_entry

Getting signed or unsigned numbers from string

"0px -123px".match(/-?\d+/g)

Results:

0 123px => [0, 123]
-0px -123px => [-0, -123]

JSLint/JSHint for TextMate

http://rondevera.github.com/jslintmate/

Cloning arrays

Array.prototype.clone = function() {
	return this.slice(0);
}

Making first character upper case

String.prototype.firstToUpperCase = function() {
    return this.charAt(0).toUpperCase() + this.slice(1).toLowerCase();
}

Quake like console on Mac

TotalTerminal