Skip to content

Instantly share code, notes, and snippets.

View lboynton's full-sized avatar
😷
<img src=x onerror=alert(1)>

Lee Boynton lboynton

😷
<img src=x onerror=alert(1)>
View GitHub Profile
@lboynton
lboynton / logstash.sh
Created April 18, 2012 14:27
Logstash init script
#! /bin/sh
### BEGIN INIT INFO
# Provides: logstash-shipper
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable service provided by daemon.
@lboynton
lboynton / graylog2-server.sh
Created August 8, 2012 11:09
Graylog2 init script
#!/bin/sh
#
# graylog2-server: graylog2 message collector
#
# chkconfig: - 98 02
# description: This daemon listens for syslog and GELF messages and stores them in mongodb
#
CMD=$1
NOHUP=`which nohup`
JAVA_CMD=/usr/bin/java
@lboynton
lboynton / WebService.php
Created September 18, 2012 18:34
Unit Testing Zend_Http_Client Based Web Service Calls
<?php
namespace App\Service;
/**
* Some web service client
*
* @author Lee Boynton
*/
class WebService
@lboynton
lboynton / memcached-init.sh
Created September 24, 2012 12:57
CentOS memcached init script with multiple instance support
#! /bin/bash
#
# chkconfig: - 55 45
# description: The memcached daemon is a network memory cache service.
# processname: memcached
### END INIT INFO
# Usage:
# cp /etc/memcached.conf /etc/memcached_server1.conf
# cp /etc/memcached.conf /etc/memcached_server2.conf
@lboynton
lboynton / noevent.js
Created October 8, 2012 11:08
QUnit: Test event is not triggered
asyncTest('Test event is not triggered', 1, function()
{
// do stuff to maybe trigger anevent on body
$(document).one('anevent', function(e)
{
ok(false, 'Should not trigger anevent');
});
setTimeout(function()
@lboynton
lboynton / onchange.sh
Created February 26, 2014 09:39 — forked from senko/onchange.sh
#!/bin/bash
#
# Watch current directory (recursively) for file changes, and execute
# a command when a file or directory is created, modified or deleted.
#
# Written by: Senko Rasic <[email protected]>
#
# Requires Linux, bash and inotifywait (from inotify-tools package).
#
# To avoid executing the command multiple times when a sequence of