This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Object.defineProperty(Object.prototype, "extend", {value: function (obj) { | |
obj.__proto__ = this; | |
return obj; | |
}}); | |
Object.defineProperty(Object.prototype, "new", {value: function () { | |
var obj = Object.create(this); | |
if (obj.initialize) obj.initialize.apply(obj, arguments); | |
return obj; | |
}}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Blog post: http://brandonaaron.net/blog/2010/03/4/event-delegation-with-jquery | |
// Try this instead of the above (didn't test) | |
$('#container').delegate('a.top', 'click', function(e) { | |
log( $(this).text() + ' clicked1'); | |
return false; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.selector { | |
/* styles that change how the element acts/positons */ | |
position: relative; top: 0; left: 0; display: block; float: left; z-index: 1; overflow: hidden; | |
/* styles that change its dimensions */ | |
margin: 0; border: 1px solid #000; padding: 0; width: 0; height: 0; | |
/* sstyles that change its appearance */ | |
background: #777 url(/images/image.png) 0 0 no-repeat; color: #000; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Sugar for type detection working across frames and browsers ;) | |
* | |
* Detected types | |
* | |
* 'arguments', 'array', 'boolean', 'date', 'document', 'element', 'error', 'fragment', | |
* 'function', 'nodelist', 'null', 'number', 'object', 'regexp', 'string', 'textnode', | |
* 'undefined', 'window' | |
* | |
* Copyright (c) 2009 Daniel Steigerwald (http://daniel.steigerwald.cz), Mit Style License |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Sugar for type detection working across frames and browsers ;) | |
* | |
* Detected types | |
* | |
* 'arguments', 'array', 'boolean', 'date', 'document', 'element', 'error', 'fragment', | |
* 'function', 'nodelist', 'null', 'number', 'object', 'regexp', 'string', 'textnode', | |
* 'undefined', 'window' | |
* | |
* Copyright (c) 2009 Daniel Steigerwald (http://daniel.steigerwald.cz), Mit Style License |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// requires nightly version of jQuery b/c it uses the add special event hook | |
// more about special event hooks: http://brandonaaron.net/blog/2009/06/4/jquery-edge-new-special-event-hooks | |
(function( $ ) { | |
$.event.special.hashchange = { | |
setup: function( data, namespaces ) { | |
if ( 'onhashchange' in window ) { | |
// sweet, native support... short-circuit | |
return false; | |
} | |
// onhashchange is not natively supported ... work around it :( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# environment variables | |
export PATH=/usr/local/bin:$PATH | |
export PATH="$HOME/bin:$PATH" | |
export PATH=/usr/local/git/bin:$PATH | |
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH" | |
export MANPATH=/usr/local/git/man:$MANPATH | |
export EDITOR="mate -w" | |
export SVN_EDITOR="mate -w" | |
# aliases |