Skip to content

Instantly share code, notes, and snippets.

View jessegavin's full-sized avatar

Jesse Gavin jessegavin

View GitHub Profile
1 Abbot of Keral Keep (ori) 127
1 Abrade (vow) 139
1 Academy Ruins (mma) 219
1 Acidic Slime (m10) 165
1 Adanto Vanguard (mb1) 10
1 Adeline, Resplendent Cathar (mid) 1
1 Ancestral Recall (leb) 48
1 Ancestral Vision (tsr) 52
1 Ancient Tomb (plist) 574
1 Animate Dead (me1) 57
{
"version": "1.1",
"title" : "My Cars",
"vehicles" : [
{
"make": "Volkswagen",
"model": "Beetle",
"year": 1953,
"color": "Green",
"engine": {
@jessegavin
jessegavin / capture-helper-params.js
Created April 28, 2016 02:14 — forked from innerfunction/capture-helper-params.js
Node.js module for capturing parameter values being passed to a dust.js helper. For example, if calling a helper {@Helper p1="{p1}" p2="{p2}"/}, this code will resolve values for p1 and p2 in a fully asynchronous manner before calling the helper function. Use the wrapper function as: var wrapper = require('./capture-helper-params'); helpers['myh…
// Capture templated parameter values passed to a dust.js helper function.
function captureParams(chunk, context, params, cb) {
// Object for recording resolved parameter values.
var values = {};
// Capture a single parameter value.
// @param {name} The parameter name.
// @param {next} Next step in the capture chain.
function capture( name, next ) {
return function( chunk ) {
// If the parameter value is a function then it is a dust.js template that needs to be
@jessegavin
jessegavin / theme.css
Created February 24, 2016 15:17
CodePen theme for JSONView
@import url(https://fonts.googleapis.com/css?family=Inconsolata);
body {
white-space: pre;
font-family: "Inconsolata";
background-color: rgb(29, 31, 32);
color: #eee;
}
.property {
body {
margin-bottom: 23px;
white-space: normal !important;
}
ul {
list-style-type: none;
padding: 0px;
margin: 0px 0px 0px 26px;
}
@jessegavin
jessegavin / parseHoursAndMinutes.js
Last active August 29, 2015 14:26
Time Parsing
function parseHoursAndMinutes(input) {
if (typeof input !== "string") {
throw "Time must be a string";
}
input = input.toLowerCase().trim();
if (input.length === 0) {
throw "Time must not be empty";
@jessegavin
jessegavin / european.js
Created October 29, 2014 15:33
An attempt at a European version of jQuery Chord Transposer
/*!
* jQuery Chord Transposer plugin v1.0
* http://codegavin.com/projects/transposer
*
* Copyright 2010, Jesse Gavin
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://codegavin.com/license
*
* Date: Sat Jun 26 21:27:00 2010 -0600
*/
@jessegavin
jessegavin / Instructions.md
Created June 6, 2014 17:28
How to make Github diffs take advantage of screen width.
@jessegavin
jessegavin / README.md
Created May 28, 2014 01:06
PHP Next Generation ReadMe file

Try using something other than PHP for crying out cornflakes!

@jessegavin
jessegavin / A-Pen-by-Jesse-Gavin.markdown
Created September 20, 2013 17:22
A Pen by Jesse Gavin.