Concept Dependence

Concept dependence is best understood using an example.

  "mrn": "001",
  "first_name": "John",
  "last_name": "Doe",
  "address": {

Keybase proof

I hereby claim:

  • I am bruth on github.
  • I am byronruth ( on keybase.
  • I have a public key whose fingerprint is 2346 07EB 7539 D135 6581 63F7 C873 29F9 01B2 88C1

To claim this, I am signing this object:


Postgres push triggers

Watch a table for changes and push a notification with a payload describing the change.


In the Postgres shell:

-- Create the functions
/usr/sbin/usermod -aG docker <user>

SQLite Update Hook Example

This is an example usage of registering an update_hook to a SQLite connection. The motivation for exploring this feature is to test out various implementations of data monitoring interfaces.

A few notable properties of the implementation:

  • The hook must be registered on the connection being used which requires clients to manually integrate this code.
  • Each INSERT and UPDATE operation requires a subsequent SELECT to get the row data.
  • When registering the hook, increasing the bufsize under heavy workloads will improve throughput, but the SQLite library is single-threaded by design.
#!/usr/bin/env python
import os
import sys
import json
from cStringIO import StringIO
from django.core import management
def cmp_value(av, bv):
View gist:cf918798014e35d4d615
boot2docker down
boot2docker destroy
curl > ~/.boot2docker/boot2docker.iso
boot2docker init
VBoxManage sharedfolder add boot2docker-vm -name home -hostpath /Users
boot2docker up
boot2docker ssh "sudo modprobe vboxsf && sudo mkdir -v -p /Users && sudo mount -v -t vboxsf -o uid=0,gid=0 home /Users"
View catch_route.js
// Route based on the URL
$(document).on('click', 'a', function(event) {
// Path of the target link
var path = this.pathname;
// Handle IE quirk
if (path.charAt(0) !== '/') path = '/' + path;
// Trim off the root on the path if present
var root = Backbone.history.root || '/';
from random import choice
from string import ascii_lowercase, digits
from django.db import transaction
from django.db.models import User
USERNAME_CHARS = ascii_lowercase + digits
View gist:7467825
def merge_sorted(*iterables, **kwargs):
"""Returns a generator that merges N sorted iterables.
An optional `cmp` keyword argument may be supplied to customize the
comparison between values produced by the iterables.
compare = kwargs.get('cmp', cmp)
direction = -1 if kwargs.get('reverse', False) else 1