Skip to content

Instantly share code, notes, and snippets.

View scottgonzalez's full-sized avatar

Scott González scottgonzalez

View GitHub Profile
@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;
@scottgonzalez
scottgonzalez / amplify-store-cleanup.js
Created June 10, 2011 12:30
clean up extra key from amplify.store <1.0.0
// Prior to 1.0.0, amplify.store created a key to track all of the values
// that were stored. The 1.0.0 release no longer uses this key and as a
// result, if you ask for all of the values (using amplify.store()) you'll
// get back one extra value.
//
// Simply include this code after you include amplify.store and it will
// remove the extra key. You'll want to include this anywhere that you
// have previously used amplify.store.
(function() {
$.fn.widget = function( widget, options ) {
var isMethodCall = typeof widget === "string",
widgetName = widget.prototype.name,
args = [].slice.call( arguments, 2 );
return this.each( isMethodCall ?
function() {
var instance = $( this ).data( name );
instance[ options ].apply( instance, args );
} :
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Multiple Requests</title>
<script src="jquery-1.6.1.js"></script>
<script src="amplify.core.js"></script>
<script src="amplify.request.js"></script>
<script>
var multiRequest = function( requests ) {
diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js
index 6b06cfe..3715fdd 100644
--- a/ui/jquery.ui.autocomplete.js
+++ b/ui/jquery.ui.autocomplete.js
@@ -43,6 +43,10 @@ $.widget( "ui.autocomplete", {
select: null
},
+ dependencies: {
+ menu: $.ui.menu
var getFiles = Step.fn(
function readDir(dir) {
this.keep(dir);
fs.readdir(dir, this.parallel());
},
function readFiles(err, dir, results) {
if (err) throw err;
// Create a new group
var group = this.group();
results.forEach(function (filename) {

This is a test of subdirectories.

Clone this repo using git clone git://gist.github.com/1925815.git gist-1925815.

Note: You must do your editing on your local clone, not using the gist UI.

function deferredRequest( resource, data ) {
return $.Deferred(function( dfd ) {
amplify.request({
resourceId: resource,
data: data,
success: dfd.resolve,
error: dfd.reject
});
}).promise();
}
git log 1-8-stable --pretty=format:"%H %s" | grep "cherry picked" | sed 's/^.*cherry picked from commit \([0-9a-f]*\).*$/\1/' | sort > 1-8
git log 1.8... --pretty=format:"%H" | sort > master
comm -13 1-8 master | xargs -L 1 git log -1 --oneline | cat
(SELECT DISTINCT `reporter` AS `contributor`
FROM `ticket`
WHERE `resolution` = "fixed"
AND `milestone` = $V )
UNION
(SELECT DISTINCT `author`
FROM `ticket_change`
WHERE `ticket` IN (
SELECT `id`
FROM `ticket`