Skip to content

Instantly share code, notes, and snippets.

(function( global, undefined ) {
var slice = [].slice,
subscriptions = {};
if (global.bus) {
return; // avoid existing instance override
}
var bus = global.bus = {
@podlipensky
podlipensky / 1.js
Created February 23, 2013 16:34 — forked from padolsey/1.js
/x/==x
@podlipensky
podlipensky / .gitconfig
Created August 23, 2012 23:40 — forked from orj/.gitconfig
Using p4merge as Git mergetool on Mac OS X.
[merge]
keepBackup = false
tool = custom
[mergetool "custom"]
cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge "$PWD/$BASE" "$PWD/$REMOTE" "$PWD/$LOCAL" "$PWD/$MERGED"
keepTemporaries = false
trustExitCode = false
keepBackup = false
@podlipensky
podlipensky / events.js
Created July 19, 2012 17:08
Simple cross-browser event handling logic for rapid examples prototyping
(function(window){
var doc = document.documentElement,
addListener, removeListener;
if (doc.addEventListener && doc.removeListener) {
addListener = function (element, eventName, handler) {
element.addEventListener(eventName, handler, false);
};
removeListener = function (element, eventName, handler) {
element.removeEventListener(eventName, handler, false);
};