Skip to content

Instantly share code, notes, and snippets.

View bobbysciacchitano's full-sized avatar

Bobby Sciacchitano bobbysciacchitano

View GitHub Profile
@monostere0
monostere0 / GlobalEvents.js
Last active February 19, 2020 08:10
Fire events between different browser windows using localStorage.
(function(window){
var EVENT_EXISTS = 'GlobalEvents: Event already exists.';
var eventIsRunning,
_eventStack,
_findByName,
stackEvent,
removeEvent,
eventListener,
@dburrows
dburrows / OS X - installing Ansible via `pip install`
Last active November 4, 2016 01:13
Reliably installing Ansible on OS X Mavericks
// brew install ansible didn't work properly,
// even tried brew install python but no joy
// so use pip on standard python install
sudo pip install ansible
// if you get errors try this
// from https://github.com/ansible/ansible/issues/7146
When you get to the step 'sudo pip install ansible', do this instead:
@Genkilabs
Genkilabs / autosavable.js
Last active January 3, 2016 03:49
Debounced Autosave for EmberJS using 1.2.0-beta.4 and EmberData 1.0.0-beta.4+canary.3993001d with hooks for pacifier from http://ricostacruz.com/nprogress
// Debounced autosave for Ember.js
// Original code by Mitch Lloyd http://gaslight.co/blog/?author=mitchlloyd
// updated from http://gaslight.co/blog/an-autosave-pattern-for-ember-and-ember-data
// repo at https://github.com/gaslight/ember-autosaving
// Changed to work with latest Ember Data as of 2013-12-16 by Genkilabs
// Includes hooks for pacifier from http://ricostacruz.com/nprogress
// NOTE: This requires a 2 part install in which the controller and any models it loads have the corresponding mixin
// This is how long we will wait on a form before saving. I like to put this in App.AUTOSAVE_DELAY
var AUTOSAVE_DELAY = 1500
@tim-evans
tim-evans / autosave.js
Created June 14, 2013 16:03
Autosave pattern for Ember with Ember Data
(function () {
// Implement debounce until backburner implements a proper debounce
var debouncees = [],
pop = Array.prototype.pop;
var debounce = function (target, method /*, args, wait */) {
var self = Ember.run.backburner,
args = arguments,
wait = pop.call(args),