This file contains 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
define(['./rison', './util'], function(rison, util) { | |
function Tracker(config) { | |
// Copy over the default settings. | |
this.settings = util.extend({}, this._defaults, config); | |
} | |
return Tracker; | |
} |
This file contains 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
(function($) { | |
var k = {}; | |
$(window).bind('keydown', function(e) { | |
if (!k[e.which]) { | |
k[e.which] = +new Date; | |
} | |
}); | |
This file contains 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
[ | |
{ | |
"id": "Botaurus stellaris", | |
"label": "Great Bittern", | |
"value": "Great Bittern" | |
}, | |
{ | |
"id": "Ixobrychus minutus", | |
"label": "Little Bittern", | |
"value": "Little Bittern" |
This file contains 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
$('fieldset').each(function(i){ | |
if (i == 0){ | |
someFunction(); | |
} | |
}); |
This file contains 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
* jQuery UI Tabs 1.8.16 | |
* | |
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) | |
* Dual licensed under the MIT or GPL Version 2 licenses. | |
* http://jquery.org/license | |
* | |
* http://docs.jquery.com/UI/Tabs#theming | |
*/ | |
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ | |
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } |
This file contains 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
$(".add_comment_link").click(function() { | |
$(this).next(".add_comment").slideToggle(); | |
}); |
This file contains 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
var api = new SnipAPI({ version: 'v1', key: '123' }); | |
api.find('appointment', 1, function(error, appointment) { | |
console.log(error || appointment); | |
}); | |
api.find('appointment', { start_time__gte: new Date }, function(error, appointments) { | |
if (error) { | |
console.error(error.messages.join('\n')); | |
} |
This file contains 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
$ curl "http://api.sniphq.com/api/v1/appointment.json?key=123" | |
{ | |
"data": [ | |
{ | |
"pk": 1, | |
"model": "appointments.appointment", | |
"fields": { | |
"stylist": { | |
"salon": 1, |
This file contains 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
{ | |
"color_scheme": "Packages/Color Scheme - Default/Tomorrow-Night.tmTheme", | |
"font_face": "Bitstream Vera Sans Mono", | |
"font_size": 15, | |
"tab_size": 2, | |
"translate_tabs_to_spaces": true, | |
"trim_trailing_white_space_on_save": true | |
} |
This file contains 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
beard() | |
.get('http://google.com/secrets/algorithms/search.txt') | |
.done(function(algorithm) { | |
// omg hax | |
}) | |
.fail(function(error) { | |
console.log('There was an error!', error) | |
}) |