Skip to content

Instantly share code, notes, and snippets.

View MarcelRobitaille's full-sized avatar

Marcel Robitaille MarcelRobitaille

View GitHub Profile
@stevermeister
stevermeister / git pre-push hook
Created March 12, 2015 15:52
git pre-push hook to run tests
#!/bin/sh
# check for how many uncommitted changes we have
# stash changes
# run grunt task
# restore stashed files if anything was stashed
# exit with error if grunt fails
NAME=$(git branch | grep '*' | sed 's/* //')
@leehsueh
leehsueh / boolparser.py
Created October 16, 2011 09:07
Python Boolean Expression Parser/Evaluator
"""
Grammar:
========
Expression --> AndTerm { OR AndTerm}+
AndTerm --> Condition { AND Condition}+
Condition --> Terminal (>,<,>=,<=,==) Terminal | (Expression)
Terminal --> Number or String or Variable
Usage:
======