Skip to content

Instantly share code, notes, and snippets.

View electrical's full-sized avatar

Richard Pijnenburg electrical

  • Eclectic Events
  • London
View GitHub Profile
@electrical
electrical / RESULTS.md
Created December 2, 2012 12:58 — forked from jordansissel/RESULTS.md
screenshot + code showing how to query logstash/elasticsearch with a graphite function.

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.

@jordansissel
jordansissel / gist:3741723
Last active February 11, 2021 04:56
OpenSSL quick. (generate certs, run server/clients)
# Create a self-signed cert
openssl req -x509 -batch -nodes -newkey rsa:2048 -keyout lumberjack.key -out lumberjack.crt
# Create a self-signed with DNS SAN
openssl req -x509 -nodes -new -subj "/CN=localhost" -addext "subjectAltName = DNS:localhost" -newkey rsa:2048 -keyout
/tmp/server.key -out /tmp/server.crt
@afair
afair / tmux.cheat
Last active June 3, 2024 23:26
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^b w
New new -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &
@stephenc
stephenc / gist:3053561
Created July 5, 2012 13:05
Continuous Deployment with Jenkins and Puppet

Puppet with Jenkins

Setup Jenkins

With Puppet:

puppet module install rtyler-jenkins

puppet apply -v -e "include jenkins"

@fluxrad
fluxrad / pre-commit
Created April 11, 2012 19:04
A pre-commit git hook to validate puppet syntax
#!/bin/bash
# pre-commit git hook to check the validity of a puppet manifest
#
# Prerequisites:
# gem install puppet-lint puppet
#
# Install:
# /path/to/repo/.git/hooks/pre-comit
# Source RVM if needed
@rafl
rafl / elasticsearch_cache
Created March 22, 2012 16:32
Munin ElasticSearch plugins
#!/usr/bin/env perl
# Parameters supported:
#
# config
# autoconf
#
# Magic markers:
#%# family=auto
#%# capabilities=autoconf