Skip to content

Instantly share code, notes, and snippets.

View jcreamer898's full-sized avatar
🏠
Working from home

Jonathan Creamer jcreamer898

🏠
Working from home
View GitHub Profile
/*
A shim for non ES5 supporting browsers.
Adds function bind to Function prototype, so that you can do partial application.
Works even with the nasty thing, where the first word is the opposite of extranet, the second one is the profession of Columbus, and the version number is 9, flipped 180 degrees.
*/
Function.prototype.bind = Function.prototype.bind || function(to){
// Make an array of our arguments, starting from second argument
var partial = Array.prototype.splice.call(arguments, 1),
// We'll need the original function.
@emjayess
emjayess / qunit-boilerplate-markup.html
Created May 11, 2011 19:13
QUnit boilerplate markup
<!DOCTYPE html>
<html>
<head>
<title>javascript unit tests...</title>
<link rel="stylesheet" href="http://code.jquery.com/qunit/git/qunit.css"/>
</head>
<body>
<h1 id="qunit-header">QUnit Sample</h1>
<h2 id="qunit-banner"></h2>
<h2 id="qunit-userAgent"></h2>
@scottgonzalez
scottgonzalez / 1.8.js
Created May 9, 2011 16:42
quick overview of extending jQuery UI widgets in 1.8 and 1.9
(function( $, prototype ) {
$.extend( prototype.options, {
spinner: "<em>Loading&#8230;</em>"
});
var _create = prototype._create;
prototype._create = function() {
_create.call( this );
var self = this;