Skip to content

Instantly share code, notes, and snippets.

@abhishektomar
abhishektomar / graphite_statsd
Created June 26, 2012 05:36
Debian Squeeze Graphite and Stats_D installation.
## Debian Repository -
--> /etc/apt/sources.list
====>
deb http://ftp.us.debian.org/debian squeeze main contrib non-free
deb-src http://ftp.us.debian.org/debian squeeze main contrib non-free
deb http://security.debian.org/ squeeze/updates main
deb-src http://security.debian.org/ squeeze/updates main
deb http://ftp.us.debian.org/debian squeeze-updates main contrib non-free
@yyuu
yyuu / gist:1569253
Created January 6, 2012 06:01
df in python on Linux
#!/usr/bin/env python
from __future__ import with_statement
import contextlib
import os
import sys
print "Filesystem\tMounted on\tUse%\tIUse%"
with contextlib.closing(open('/etc/mtab')) as fp:
for m in fp:
@fetep
fetep / 00-log4j.diff
Created January 2, 2012 22:46
logstash + log4j configuration!
diff --git a/lib/logstash/logging.rb b/lib/logstash/logging.rb
index bafb342..b0692e2 100644
--- a/lib/logstash/logging.rb
+++ b/lib/logstash/logging.rb
@@ -3,6 +3,8 @@ require "cabin"
require "logger"
class LogStash::Logger < Cabin::Channel
+ attr_accessor :target
+
@sckott
sckott / taxize_rgbif_eg.R
Created November 1, 2011 00:23
Example of using taxize and rgbif packages together.
#######################################################
# by Scott Chamberlain <[email protected]>
# for blog post titled "Awesome use case: check my species names and
# gimme some distribution data"
#######################################################
# Load packages
install.packages(c("RCurl","stringr","XML","plyr","RJSONIO"))
require(RCurl);require(stringr);require(XML);require(plyr);require(RJSONIO)
# Clone taxize and rgbif repositories from GitHub
@jordansissel
jordansissel / How to use
Created June 2, 2011 18:36
Adding debug logging to ElasticSearch client in logstash
# How to use
* Download the log4j.properties file
* Add it to your logstash jar file: jar -uf logstash-1.0.10.jar log4j.properties