Skip to content

Instantly share code, notes, and snippets.

omerhasan /
Created Jun 27, 2012 — forked from kamermans/
HAProxy log analyzer to show response latency distribution from the console
# HAProxy Performance Statistics
# by Steve Kamerman
# To use, pipe your HAProxy log with timing information (like "0/0/1/1/3 200") to
# this script. It will output min, max, med, avg and a latency distribution graph.
# Info on timing logging in HAProxy:
omerhasan / ebs_raid.rb
Created May 22, 2012 — forked from tnine/ebs_raid.rb
Ebs raid mounting. Links to this jira issue
View ebs_raid.rb
include Opscode::Aws::Ec2
#Auto locates and attached ebs devices based on the data bag they reside in. The following test cases need to be performed
# Create multiple resources with new node: PASS
# Re-attach multiple resources after a reboot: PASS
# Create resources across 2 runs. First run creates first raid set, second run re-attaches then creates: PASS
omerhasan / dhcpd.conf
Created Apr 16, 2012 — forked from tomoconnor/dhcpd.conf
snippet to show usage of dhcp-event (don't forget to set apparmor to allowing (complain) mode)
View dhcpd.conf
subnet netmask {
option broadcast-address;
option routers;
on commit {
set ClientIP = binary-to-ascii(10, 8, ".", leased-address);
set ClientMac = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));
log(concat("Commit: IP: ", ClientIP, " Mac: ", ClientMac, "Hostname: ", host-decl-name));
execute("/usr/local/bin/dhcp-event", "commit", ClientIP, ClientMac, host-decl-name);
omerhasan /
Created Oct 3, 2011 — forked from samuel/
PagerDuty script for Munin
#!/usr/bin/env python
import json
except ImportError:
import simplejson as json
import sys
from pagerduty import PagerDuty
def parse(txt):