Skip to content

Instantly share code, notes, and snippets.

View ianmetcalf's full-sized avatar

Ian Metcalf ianmetcalf

View GitHub Profile
@ianmetcalf
ianmetcalf / mithril-debounce.js
Last active February 4, 2016 19:54
Delay redraw for debounced events,based on https://www.npmjs.com/package/debounce
import m from 'mithril';
import now from 'date-now';
export default function debounce(func, wait = 100, immediate = false) {
let context, args, timestamp, timeout, result;
function debounced() {
context = this;
args = arguments;
timestamp = now();
@ianmetcalf
ianmetcalf / router.js
Created December 5, 2014 19:54
Chainable Async Router
var ChainableRouter = BaseRouter.extend({
constructor: function(options) {
BaseRouter.apply(this, arguments);
this.options = options || {};
this._initRoutes();
},
@ianmetcalf
ianmetcalf / framework_burnout.md
Last active February 4, 2016 16:06
Notes for framework smack down

Framework Burnout

The life cycle of a newly discovered framework

Initially a new framework looks empowering. The examples and ideas behind them are inspiring. You think, of course, this is how things should be done. You try it out and marvel at how quick it is to get up and running. You witness the power you now wield to create software for the masses with minimal effort. You're hooked.

You start to talk to others about how amazing this new framework is. How it solves all the problems you've ever encountered and how everyone should immediately stop working with their antiquated junk and adopt it. Naysayers are easily dismissed because they just haven't yet come to understand the elegance. You become an evangelist for this new way of thinking.