Skip to content

Instantly share code, notes, and snippets.

@timbunce
timbunce / smzp_sinopsys.md
Created August 1, 2012 14:22 — forked from melo/smzp_sinopsys.md
mzp synopsis

mpz synopsis

mpz is a ZeroMQ-based pipe.

It will read stuff from STDIN and output to ZeroMQ sockets, and read from ZeroMQ sockets and send to STDOUT.

Messages are terminated by newlines, or pairs of newlines in paragraph mode.

Supports 1-to-1, 1-to-N and N-to-1. There is a special mode to start as

@timbunce
timbunce / pr.md
Created April 1, 2013 09:25 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

logstash queries graphed with graphite.

Operation: Decouple whisper from graphite.

Method: Create a graphite function that does a date histogram facet query against elasticsearch for a given query string for the time period viewed in the current graph.

Reason: graphite has some awesome math functions. Wouldn't it be cool if we could use those on logstash results?

The screenshot below is using logstash to watch the twitter stream of keywords "iphone" "apple" and "samsung" - then I graph them each, so we get an idea of popularity. As a bonus, I also do a movingAverage() on the iphone curve to show you why this is awesome.

{
"query": {
"match_all": {}
},
"filter": {
"and": [
{
"term": {
"path": "cpanfile"
}