Skip to content

Instantly share code, notes, and snippets.

View grantc's full-sized avatar

Grant Croker grantc

View GitHub Profile
@grantc
grantc / pre-commit
Created April 1, 2014 16:32
puppet pre-commit hook
#!/bin/sh
syntax_errors=0
error_msg=$(mktemp /tmp/error_msg.XXXXXX)
if git rev-parse --quiet --verify HEAD > /dev/null
then
against=HEAD
else
# Initial commit: diff against an empty tree object
# Used by WSGI to create the Flask application
import sys
import os
import newrelic.agent
dirname = os.path.dirname(globals()['__file__'])
sys.path.insert(0, dirname)
firewall { "504 Allow packet fragments to ${nfs_server} from ${web_servers[0]}":
table => 'filter',
chain => 'INPUT',
proto => 'tcp',
isfragments => true,
action => 'accept',
source => $web_servers[0],
}
@grantc
grantc / cppunit.patch
Created November 21, 2012 09:13 — forked from peoplemerge/java.env
Zookeeper RPM spec for CentOS 5.x/6.x, including python bindings
--- src/c/configure.ac.orig 2012-11-21 10:30:09.966335111 +0100
+++ src/c/configure.ac 2012-11-21 10:30:45.536188378 +0100
@@ -22,27 +22,6 @@
AC_CONFIG_HEADER([config.h])
# Checks for programs.
-AC_ARG_WITH(cppunit,
- [ --without-cppunit do not use CPPUNIT])
-
-if test "$with_cppunit" = "no" ; then