Skip to content

Instantly share code, notes, and snippets.

@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
@sckott
sckott / taxize_rgbif_eg.R
Created November 1, 2011 00:23
Example of using taxize and rgbif packages together.
#######################################################
# by Scott Chamberlain <myrmecocystus@gmail.com>
# 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
@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
+
@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:
@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
@miekg
miekg / x
Created February 6, 2013 09:21
tld-dnssec-check
for tld in $(awk ' { print $1 }' root-zone | egrep '^[a-z0-9-]+\.$' | sort -u); do
echo -n $tld:
if dig +dnssec DNSKEY $tld | grep -q RRSIG; then
echo -n DNSSEC:
else
echo -n dnssec:
fi
echo $(dig +noall +answer ${tld}cc.jpmens.net txt | awk ' { print $5" "$6" "$7" "$
@rafaelrosafu
rafaelrosafu / instructions.md
Last active December 17, 2015 19:09
Compile and Install Heka on Centos 6.4

More info on http://hekad.readthedocs.org/en/latest/installing.html

Build and test hekad

yum install git gcc patch python-devel
rpm -ihv http://pkgs.repoforge.org/cmake/cmake-2.8.8-1.el6.rfx.x86_64.rpm

git clone git@github.com:mozilla-services/heka-build.git
cd heka-build
@rep
rep / masscares.py
Created September 24, 2013 13:31
pycares mass resolver, input names on stdin
#!/usr/bin/python
# -*- coding: utf8 -*-
import sys
import os
import time
import select
import socket
import pycares
@debasishg
debasishg / gist:8172796
Last active July 29, 2024 18:23
A collection of links for streaming algorithms and data structures

General Background and Overview

  1. Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
  2. Models and Issues in Data Stream Systems
  3. Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&amp;rep=rep1&amp;t
@slouma2000
slouma2000 / install_ruby_1.9.3
Last active May 14, 2019 20:27
Install Ruby 1.9.3 on CentOS, RedHat using RVM
Step 1: Upgrade Packages
# yum update
# yum groupinstall "Development Tools"
Step 2: Installing Recommended Packages
# yum install gcc-c++ patch readline readline-devel zlib zlib-devel
# yum install libyaml-devel libffi-devel openssl-devel make
# yum install bzip2 autoconf automake libtool bison iconv-devel
Step 3: Install RVM ( Ruby Version Manager )