Skip to content

Instantly share code, notes, and snippets.

@cowboy
cowboy / jquery.ba-logselector.js
Created October 22, 2010 15:04
jQuery log selector: See what your selectors are selecting!
/*!
* jQuery log selector - v0.1pre - 6/2/2011
* http://benalman.com/
*
* Copyright (c) 2011 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
// Log the selector used to select elements to each selected element,
@cowboy
cowboy / jquery.ba-simplewidget.js
Created October 28, 2010 19:21
jQuery simpleWidget: a super-simple stateful widget factory
/*!
* jQuery simpleWidget - v0.1pre - 10/28/2010
* http://benalman.com/
*
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
(function($,undefined){
@cowboy
cowboy / ba-whatevcache.js
Created November 1, 2010 17:17
whatevCache: a simple localStorage-if-you-got-it, otherwise not-at-all-persistent data object cache.
/*!
* JavaScript whatevCache - v0.2pre - 12/30/2010
* http://benalman.com/
*
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
// whatevCache.set( key, value [, ttl ] );
@cowboy
cowboy / HEY-YOU.md
Last active September 25, 2025 09:25
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.
@cowboy
cowboy / jQuery immediate ready.js
Created November 5, 2010 16:32 — forked from ralphholzmann/jQuery immediate ready.js
Bind DOM ready event handlers before jQuery is loaded
// Create a "fake" jQuery function that accepts function arguments to be
// queued as DOM ready callbacks.
(function(window){
var fake = window.jQuery = window.$ = function( fn ) {
if ( Object.prototype.toString.call( fn ) === '[object Function]' ) {
fake.queue.push( fn );
}
};
@cowboy
cowboy / jquery-summit-ticket-winners.js
Created November 10, 2010 20:53
2nd Annual jQuery Summit ticket winners!
var developer = [
'@jaredwilli',
'@addy_osmani',
'@coldfuser',
'@jakemcgraw',
'@robtarr'
],
designer = [
'@uberPinto',
@cowboy
cowboy / MultiRes.ini
Created November 12, 2010 01:58
Useful settings for MultiRes (Win XP + IE VM)
[Refresh1]
Confirmation=0
[Options]
Lock=0
XP=1
LimitModes=1
[Inclusions]
640x480=1
@cowboy
cowboy / Cowboy Presentation.tmTheme
Created November 17, 2010 21:41
A very quickly thrown-together TextMate theme for presenting, place into ~/Library/Application Support/TextMate/Themes/
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>author</key>
<string>Cowboy</string>
<key>comment</key>
<string>Thrown together by Cowboy in 7 minutes, right before a presentation</string>
<key>name</key>
<string>Cowboy - Presentation</string>
@cowboy
cowboy / com.benalman.manserver.plist
Created November 18, 2010 16:19
manServer in OS X
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>manServer</string>
<key>OnDemand</key>
<false/>
@cowboy
cowboy / jquery.ba-nodetype.js
Created November 18, 2010 20:24
jQuery nodetype filter: Filter the selected elements by nodeType
/*!
* jQuery nodetype filter - v0.1pre - 11/18/2010
* http://benalman.com/
*
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
(function($){