Skip to content

Instantly share code, notes, and snippets.

View ThomasBurleson's full-sized avatar

Thomas Burleson ThomasBurleson

View GitHub Profile
@ThomasBurleson
ThomasBurleson / Another mock approach.js
Created November 16, 2011 23:59 — forked from cowboy/jquery.ba-simple-ajax-mocking.js
Simple jQuery (1.5+) AJAX Mocking (requires JSON, tested in jQuery 1.7))
// mock ajax
$.ajaxPrefilter( function( options, originalOptions, jqXHR ) {
if ( /^\/?mock-ajax/.test( originalOptions.url ) ) {
// make new deferred and save any success/error handlers
var success = options.success,
error = options.error;
// kill off the old handlers
options.success = options.error = null;
@ThomasBurleson
ThomasBurleson / pre-commit
Created November 16, 2011 21:58 — forked from mklabs/pre-commit
run jshint as git/hg hooks, NO COMMIT IF NO LINT FREE.
#!/usr/bin/env node
// todo: try to require jshint here, instead of spawning process, then fallback to spawning process.
var jshint = nrequire('jshint');
if (jshint) return process.exit(0);
// jshint not installed locally, spawn process instead.
// basically the same, but less pretty.
var exec = require('child_process').exec;
@ThomasBurleson
ThomasBurleson / NoBorder.fxg
Created August 24, 2011 00:49 — forked from bclinkinbeard/NoBorder.fxg
AS3 Bar Skin for Mobile
<Graphic version="2.0" xmlns="http://ns.adobe.com/fxg/2008"
scaleGridLeft="0" scaleGridTop="0" scaleGridRight="0" scaleGridBottom="0">
<Rect x="0" y="0" width="1" height="1">
<fill>
<SolidColor color="#FFFFFF" alpha="0" />
</fill>
</Rect>
</Graphic>
@ThomasBurleson
ThomasBurleson / gist:1063561
Created July 4, 2011 16:15 — forked from bclinkinbeard/gist:1062343
Signals with Swiz and [SignalHandler]
package control
{
public class AlertsController
{
[Inject( "alertsDelegate" )]
public var delegate:CacheEnabledDelegate;
[Inject]
public var serviceHelper:IServiceHelper;