Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name monkeybusiness-codeschool
// @namespace https://github.com/johnelliott/monkeybusiness
// @include http://*.codeschool.com/*
// ==/UserScript==
// this is not actually a UserScript. because `getEventListeners` only exists in the dev-consoles.
// so copy paste this content in rather than actually running it as a userscript
// the capability not actually in HTML.
@rektide
rektide / gist:bb6cec805fe73ae3875c
Last active August 29, 2015 14:10
bottom-up-vs-top-down-engineering

My feedback from the perspective of a framework developer is quite different. I found the tone and attitude towards express.js to be concerning and somewhat offensive. Here was a developer blaming the framework he chose for poor architecture when they never bothered to actually learn how the framework works in the first place. Everything that followed originated from this basic lack of understanding.

Express is designed with from a classic framework-developer perspective, exposing primarily a 'consumption-only' that allows developers to assemble together complex routing structures.

Express uses a very simple router logic which is at the core of how express works, so let’s examine that first (my knowledge of express is somewhat dated but I think the principal is still the same). Express keeps a hash of the various HTTP methods (GET, POST, etc.) and for each method, an array of middlewares. Each middleware is just a function with signature function(req, res, next) and an regular expression used to decid

@rektide
rektide / Makefile
Last active August 29, 2015 14:22 — forked from vanstee/Makefile
# Base dirs
SRC_DIR = src
TMP_DIR = tmp
DEV_DIR = dev
SRC_PUBLIC_DIR := $(SRC_DIR)/public
SRC_STYLES_DIR := $(SRC_DIR)/styles
SRC_SCRIPTS_DIR := $(SRC_DIR)/scripts
TMP_SCRIPTS_DIR := $(TMP_DIR)/scripts
DEV_PUBLIC_DIR := $(DEV_DIR)/public
DEV_STYLES_DIR := $(DEV_DIR)/styles
@rektide
rektide / readme.md
Created October 19, 2011 21:34 — forked from max-mapper/readme.md
SLEEP - syncable.org

Your API does REST, but can it SLEEP?

SLEEP (Syncable Lightweight Event Emitting Persistence) is an emerging standard for distributed data sync using HTTP and JSON. A generalized version of CouchDB's much lauded built-in replication, SLEEP extends the REST architecture to define a way in which databases can offer syncable JSON APIs that foster open data innovation by allowing developers to replicate entire databases over the net.


SLEEP comes from the Apache CouchDB project which is now widely known for it's multi-master streaming HTTP + JSON replication. This is possible in part because of the CouchDB _changes feed, which is a particular API that lets you see if there have been any changes made to the database since last time you synchronized. CouchDB can efficiently implement the _changes feed because of one subtle difference between it and most other databases: it stores a history of all changes that happen to the database, including deletes.

If you synchronize data from a remote source and then the

Originally:
https://gist.github.com/7565976a89d5da1511ce
> Not being able to rely on a strong community presence meant we had to fend for
> ourselves in figuring out what "good" Scala was. In hindsight, I definitely
> underestimated both the difficulty and importance of learning (and teaching)
> Scala. Because it's effectively impossible to hire people with prior Scala
> experience (of the hundreds of people we've interviewed perhaps three had Scala
> experience, of those three we hired one), this matters much more than it might
@rektide
rektide / gist:3202107
Created July 29, 2012 22:07 — forked from aphyr/gist:3200829
Node.js message passing test
var cluster = require('cluster');
var m = 1000000;
function bounce(msg, out) {
if (msg < m) {
out.send(msg + 1);
return null;
} else {
console.log("Finished with", msg);
<unit id='toolingorg.eclipse.e4.fix.jvmArg' version='4.2.0.I20120131-2200' singleton='false'>
<provides size='2'>
<provided namespace='org.eclipse.equinox.p2.iu' name='toolingorg.eclipse.e4.fix.jvmArg' version='4.2.0.I20120131-2200'/>
<provided namespace='toolingorg.eclipse.sdk.ide' name='org.eclipse.e4.fix.jvmArg' version='4.2.0.I20120131-2200'/>
</provides>
<requires>
<required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.sdk.ide' range='[0.0.0,5.0.0)'/>
</requires>
<touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
<touchpointData size='1'>
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@rektide
rektide / direnv-launch
Created July 21, 2016 15:14 — forked from mfowlewebs/direnv-launch
~/.bin/direnv-launch
#!/bin/zsh
. ./.envrc
eval $*