Skip to content

Instantly share code, notes, and snippets.

View andrewplummer's full-sized avatar
🙃

Andrew Plummer andrewplummer

🙃
View GitHub Profile
// ----
// Sass (v3.4.21)
// Compass (v1.0.3)
// ----
.example-block {
color: blue;
}
.example__actions {
@andrewplummer
andrewplummer / Sass inheriting nested
Last active May 30, 2016 05:12
Sass inheriting nested.
// ----
// Sass (v3.4.21)
// Compass (v1.0.3)
// ----
body p .foo {
color: red;
}
.bar {
// ----
// Sass (v3.4.21)
// Compass (v1.0.3)
// ----
.foo {
color: black;
}
.bar {
// Requires bufferWithMap custom operator (below).
function KeyEventManager (delay) {
this.shortcutsBySeqId = {};
this.partialSequenceCounts = {};
this.delay = delay;
}
KeyEventManager.prototype.connectObservable = function(observable) {
this.setupObservable(observable);
@andrewplummer
andrewplummer / Error.js
Created January 12, 2017 12:37
Python/Ruby style error handling
(function() {
// lib
// Private
function canHandleError(err, block) {
return !block.errorClasses || block.errorClasses.some(function(errorClass) {
return err instanceof errorClass;
});
}