Skip to content

Instantly share code, notes, and snippets.

View lanyonm's full-sized avatar

Michael Lanyon lanyonm

View GitHub Profile
@lanyonm
lanyonm / wattcher.py
Created October 13, 2013 03:59
The python script used to collect XBee Kill-a-Watt data.
#!/usr/bin/env python
import serial, time, datetime, sys
from xbee import xbee
from socket import socket
import sensorhistory
LOGFILENAME = "powerdatalog.csv" # where we will store our flatfile data
DEFAULT_CARBON_SERVER = 'localhost'
DEFAULT_CARBON_PORT = 2003
@lanyonm
lanyonm / Cheffile
Last active December 25, 2015 11:28
A Vagrant config for Graphite & StatsD.
site "https://supermarket.getchef.com/api/v1"
cookbook "apt"
cookbook "graphite", "0.4.8"
cookbook "vim"
cookbook "statsd",
:git => "https://github.com/hectcastro/chef-statsd",
:ref => "v1.1.3"
@lanyonm
lanyonm / logstash.conf
Created November 28, 2013 20:33
Logstash configuration file
input {
file {
type => "nginx-access"
path => ["/var/log/nginx/access.log"]
}
}
filter {
if [type] == "nginx-access" {
grok {
# https://github.com/logstash/logstash/tree/master/patterns/grok-patterns
{
"title": "Apache and Tomcat Logs",
"services": {
"query": {
"list": {
"0": {
"query": "apache !tomcat !static",
"alias": "",
"color": "#7EB26D",
"id": 0,

Keybase proof

I hereby claim:

  • I am lanyonm on github.
  • I am lanyonm (https://keybase.io/lanyonm) on keybase.
  • I have a public key whose fingerprint is FD54 B310 13BB 5C2F 3BBC 7703 B76C 1A71 AACD 7709

To claim this, I am signing this object: