Skip to content

Instantly share code, notes, and snippets.

@jschaf
jschaf / Makefile
Last active August 29, 2015 14:03
Pandoc Citeproc
all:
pandoc --filter pandoc-citeproc --variable="linestretch=2" --include-after-body=afterbody.tex -o minimal.pdf minimal.md
+ 9646f0b... 06/29/14 13:07 public Pandoc Citeproc
1371055 11/16/11 14:25 public haskell regex.dfa engine
479954 07/17/10 19:56 public
@jschaf
jschaf / Makefile
Last active August 29, 2015 14:03
pandoc-citeproc bibtex
INPUT = minimal.md
OUTPUT = minimal.pdf
TEMPLATE = template.tex
all:
pandoc \
--filter pandoc-citeproc \
--standalone \
--variable="linestretch=2" \
--template=$(TEMPLATE) \
@jschaf
jschaf / Gruntfile.js
Last active August 29, 2015 14:09
Gruntfile.js Watch Task doesn't produce output
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
connect: {
-----BEGIN WEBFACTION INSTALL SCRIPT-----
#!/usr/local/bin/python2.4
"""
MediaWiki 1.15.4
Notes:
- The database will be named after your application,
e.g. username_application.
@jschaf
jschaf / gist:1371055
Created November 16, 2011 19:25
haskell regex.dfa engine
{-
Engine-mod.hs is an attempt to add missing functionality to Engine.hs
* ^ and $ anchor support
* Multiline compile option to affect .
* case sensitive compile option for characters (just downcase everything?)
* substring matching? (libTRE papers?)
Anchors are "boundary" matchers, not character matchers. So I need to
generalize the concept of the branching. And boundaries can coincide.
@jschaf
jschaf / lldb.py
Created November 12, 2015 08:49
Left Leaning Red Black Tree
class LLRB(object):
class Node(object):
RED = True
BLACK = False
__slots__ = ['value', 'left', 'right', 'color']
def __init__(self, value):
@jschaf
jschaf / answers.txt
Created February 29, 2016 02:55
Generate combinations of numbers
50 4 - 6 75 - 100 + 25 * +
50 4 - 6 75 100 - - 25 * +
50 4 6 75 - 100 + 25 * - -
50 4 6 75 100 - - 25 * - -
75 4 - 6 50 100 25 - + * +
75 4 - 6 50 100 + 25 - * +
75 4 6 50 100 25 - + * - -
75 4 6 50 100 + 25 - * - -
50 4 75 6 100 + - 25 * + -
50 4 75 6 - 100 - 25 * + -
@jschaf
jschaf / index.js
Last active September 1, 2016 06:41
test
const ERROR = 2;
module.exports = {
extends: [],
parserOptions: {
ecmaVersion: 6,
sourceType: 'script',
},
We couldn’t find that file to show.