Skip to content

Instantly share code, notes, and snippets.

View dgreenway's full-sized avatar

Devon Greenway dgreenway

View GitHub Profile
@dgreenway
dgreenway / gist:87e329213ce410e38589
Created October 7, 2015 03:19 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
(function (ko, handlers, unwrap, extend) {
"use strict";
extend(handlers, {
stopBubble: {
init: function(element) {
ko.utils.registerEventHandler(element, "click", function(event) {
event.stopPropagation();
});
}
},
@dgreenway
dgreenway / namespaced.js
Last active August 29, 2015 14:19 — forked from stevobengtson/gist:16a89a194055f7cce11d
Namespaced js object
// Example of creating a Name Spaced object in javascript inspired by:
// http://stackoverflow.com/questions/881515/how-do-i-declare-a-namespace-in-javascript
// Jaco Pretorius: http://stackoverflow.com/users/121531/jaco-pretorius
(function( skillet, $, undefined ) {
//Private Property
var isHot = true;
//Public Property
skillet.ingredient = "Bacon Strips";
@dgreenway
dgreenway / pubsub-simple.js
Created November 14, 2013 05:00 — forked from fatihacet/pubsub-simple.js
Simple Pub Sub implementation in javascript
var pubsub = {};
(function(q) {
var topics = {}, subUid = -1;
q.subscribe = function(topic, func) {
if (!topics[topic]) {
topics[topic] = [];
}
var token = (++subUid).toString();
topics[topic].push({
token: token,