Skip to content

Instantly share code, notes, and snippets.

@chrisdew
chrisdew / example.html
Created June 16, 2011 08:43 — forked from joelnet/example.html
Unobtrusive Knockout support library for jQuery
Choose a ticket class: <select id="tickets"></select>
<p id="ticketOutput"></p>
<script id="ticketTemplate" type="text/x-jquery-tmpl">
{{if chosenTicket}}
You have chosen <b>${ chosenTicket().name }</b>
($${ chosenTicket().price })
<button data-bind="click: resetTicket">Clear</button>
{{/if}}
@chrisdew
chrisdew / binlog-tailer.js
Created May 7, 2011 05:45 — forked from laverdet/binlog-tailer.js
MySQL binlog tailer
"use strict";
this.MysqlBinlogTailer = MysqlBinlogTailer;
var EventEmitter = require('events').EventEmitter;
var fs = require('fs');
var path = require('path');
/**
* Tails a Mysql binlog and emits an event for every query executed.
*/