Skip to content

Instantly share code, notes, and snippets.

View addisonj's full-sized avatar

Addison Higham addisonj

View GitHub Profile
@addisonj
addisonj / collectd.conf
Created November 7, 2012 15:27
Collectd issues on ubuntu 12.04 and python plugins
#
# This file is generated by Chef
# Do not edit, changes will be overwritten
#
Hostname ""
FQDNLookup true
BaseDir "/opt/collectd"
PluginDir "/opt/collectd/lib/collectd"
TypesDB "/opt/collectd/share/collectd/types.db"
Denormalizing roviIds on teams...
Denormalizing sourceIds on upcoming games...
matching games 2013-04-23
matched 20 games
unmatched games: [ '1283609 Twins Marlins on Fox Sports Florida, Fox Sports North - Minnesota' ]
matching games 2013-04-24
matched 19 games
unmatched games: [ '1282616 White Sox Indians on SportsTime Ohio, Comcast Sports Network',
'1322200 Twins Marlins on Fox Sports Florida, Fox Sports North - Minnesota',
'1284153 Astros Mariners on ROOT SPORTS, Comcast Sports Network',
@addisonj
addisonj / rm-corrupt.sh
Last active December 23, 2015 05:28 — forked from codepunkt/rm-corrupt.sh
Checks all the wsp files in a whisper storage and deletes any corrupt files
#!/bin/bash
matches=()
directory='/opt/graphite/storage/whisper'
for file in $(find $directory -type f -name '*.wsp' -print); do
$(python /usr/local/bin/whisper-info.py $file > /dev/null 2>&1)
retval=$?
echo "checking $file"
[ $retval -ne 0 ] && matches+=($file)
[
"ackbar"
, "commandlinefu.coffee"
, "facepalm.coffee"
, "github-issue-link.coffee"
, "grumpycat.coffee"
, "karma.coffee"
, "redis-brain.coffee"
, "robot-memes.coffee"
, "shipit.coffee"
@addisonj
addisonj / serf_host_handler.sh
Last active January 3, 2016 22:59
Manage /etc/hosts using serf
#!/bin/bash
HOST_FILE=/etc/hosts
hn=`hostname`
touch $HOST_FILE
lines=`cat`
appendIfNotPresent() {
if [ "$2" == "$hn" ]; then
@addisonj
addisonj / es-log
Created January 31, 2014 23:48
Cluster fails for two nodes in separate LXC containers trying to communicate over NAT
[discovery.zen ] [es-logs-1] failed to send join request to master [[es-logs-0][2iXPJ_l1Tj-IQy-DZoBdYQ][c0][inet[/192.168.1.1:9300]]{master=true}], reason [org.elasticsearch.transport.RemoteTransportException: [es-logs-1][inet[/192.168.1.1:9300]][discovery/zen/join]; org.elasticsearch.ElasticsearchIllegalStateException: Node [[es-logs-1][y0bTEFKQRCit2FOYCBy1KA][c0][inet[/192.168.1.1:9300]]{master=true}] not master for join request from [[es-logs-1][y0bTEFKQRCit2FOYCBy1KA][c0][inet[/192.168.1.1:9300]]{master=true}]]
var fileProcessor = require("../lib/fileProcessor.js")
var assert = require("assert");
var fs = require("fs");
var decl = {
"id" : "some_unique_id",
"files" : [
{
"filename" : "main.js",
@addisonj
addisonj / host
Last active August 29, 2015 13:56
Feb 14 19:46:20 es-logs-0 c0: elasticsearch | [2014-02-14 19:46:20,414][WARN ][cluster.service ] [es-logs-0] failed to reconnect to node [es-logs-0][1ocHvK_vS126Bo4KWLMvgA][c0][inet[/172.16.23.128:9300]]{master=true}
Feb 14 19:46:20 es-logs-0 c0: elasticsearch | org.elasticsearch.transport.ConnectTransportException: [es-logs-0][inet[/172.16.23.128:9300]] connect_timeout[30s]
Feb 14 19:46:20 es-logs-0 c0: elasticsearch | at org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:718)
Feb 14 19:46:20 es-logs-0 c0: elasticsearch | at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:647)
Feb 14 19:46:20 es-logs-0 c0: elasticsearch | at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:615)
Feb 14 19:46:20 es-logs-0 c0: elasticsearch | at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:129)
Feb 14 19:46:20 es-logs-0 c0: elasticsearch | at org.elasticsearch.cluster.service
@addisonj
addisonj / container
Created February 17, 2014 23:41
Docker run comand
^C^Croot@codetrain-base:~# docker run -i -t -p 3000:3000 ubuntu /bin/bash
root@7c761d543db3:/# nc -kl 3000 &
[1] 9
root@7c761d543db3:/# echo "hello" | nc 192.168.133.128 3000
hello
root@7c761d543db3:/# ifconfig
eth0 Link encap:Ethernet HWaddr 96:81:71:3a:55:8d
inet addr:172.17.0.3 Bcast:0.0.0.0 Mask:255.255.0.0
inet6 addr: fe80::9481:71ff:fe3a:558d/64 Scope:Link
UP BROADCAST RUNNING MTU:1500 Metric:1
### Keybase proof
I hereby claim:
* I am addisonj on github.
* I am addisonj (https://keybase.io/addisonj) on keybase.
* I have the public key with fingerprint 7229 8E1C 5B4D 46A8 1165  BFAF 4CC0 5809 E627 6843
To claim this, I am signing this object: