Skip to content

Instantly share code, notes, and snippets.

View matchdav's full-sized avatar

Matthew Davidson matchdav

View GitHub Profile
@matchdav
matchdav / index.js
Created July 6, 2015 19:28
requirebin sketch
var $ = require('jquery');
var Backbone = require('backbone');
window.jQuery = $;
var _ = require('lodash'),
rivets = require('rivets');
rivets.adapters[':'] = {
observe: function(obj, keypath, callback) {
obj.on('change:' + keypath, callback)

Keybase proof

I hereby claim:

  • I am matchdav on github.
  • I am mcd (https://keybase.io/mcd) on keybase.
  • I have a public key whose fingerprint is 753C 1FAD A323 C272 B6D7 D816 C8C4 D7CF 5170 A137

To claim this, I am signing this object:

@matchdav
matchdav / index.js
Last active August 29, 2015 14:18
requirebin sketch
var Backbone = require('backbone'),
rivets = require('rivets'),
Model = Backbone.Model,
View = Backbone.View;
var $ = Backbone.$ = require('jquery');
var a = new Model({});
@matchdav
matchdav / index.js
Last active August 29, 2015 14:06
requirebin sketch
var Vue = require('vue'),
Mustache = require('mustache'),
_ = require('lodash');
var obj = {
name:'Roger',
species:'rabbit',
mood:'grumpy'
};
@matchdav
matchdav / ko-deferred-binding.html
Last active August 29, 2015 14:03
How to defer a knockout binding.
<html>
<head>
<title></title>
</head>
<body>
<div id="bindme">
<p data-bind="text:prop"></p>
</div>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/knockout/3.1.0/knockout-min.js"></script>
@matchdav
matchdav / check4assignments.py
Created September 22, 2012 18:08
Uvic - CSC 326 Algorithms - check for posted assignments and send them by email.
import commands
import re
#I wrote this script to check whether our Uvic CSC 326 assignments are posted.
#That's because our instructor can't be bothered to let us know when he posts them.
#I suggest using cron to schedule it every 15 mins on your server
email = "[email protected]"
def do_mailout(email, filename, url):
@matchdav
matchdav / taxmeta.class.php
Created August 9, 2012 20:50 — forked from jonathonbyrdziak/taxmeta.class.php
Taxonomy Metaboxes, allows you to create additional taxonomy metas, including images.
<?php
/**
* @Author Anonymous
* @link http://www.redrokk.com
* @Package Wordpress
* @SubPackage RedRokk Library
* @copyright Copyright (C) 2011+ Redrokk Interactive Media
*
* @version 2.0
*/