Skip to content

Instantly share code, notes, and snippets.

View rasputnik's full-sized avatar
💭
trying out graphiQL

rasputnik rasputnik

💭
trying out graphiQL
View GitHub Profile
Gem found matching: jruby-openssl (= 0.8.7)
Gem found matching: jruby-win32ole (>= 0)
Gem found matching: jdbc-mysql (>= 0)
Gem found matching: msgpack-jruby (>= 0)
Gem found matching: cinch (>= 0)
Gem found matching: spoon (>= 0)
Gem found matching: mocha (>= 0)
Gem found, but funky: shoulda (>= 0) (Unable to activate bourne-1.1.2, because mocha-0.13.3 conflicts with mocha (= 0.10.5))
Gem found matching: rspec (>= 0)
Gem found matching: insist (= 0.0.8)
@rasputnik
rasputnik / hotbunny.rb
Created April 29, 2013 14:04
Logstash hot_bunnies based AMQP output.
require "logstash/outputs/base"
require "logstash/namespace"
# Push events to a RabbitMQ exchange using the (JRuby-only) hot_bunnies library.
#
# This has been tested with hot_bunnies 1.5.0.
# find links to both here:
#
# * RabbitMQ - <http://www.rabbitmq.com/>
# * Hot Bunnies - <https://github.com/ruby-amqp/hot_bunnies>
@rasputnik
rasputnik / trappy.rb
Last active December 17, 2015 02:59
dropping this into $pluginpath/logstash/inputs/trappy.rb works for me. Just populate an external directory, then point the plugin at it with a "yamlmibdir" config option.
require "logstash/inputs/base"
require "logstash/namespace"
# Read snmp trap messages as events
#
# Resulting @message looks like :
# #<SNMP::SNMPv1_Trap:0x6f1a7a4 @varbind_list=[#<SNMP::VarBind:0x2d7bcd8f @value="teststring",
# @name=[1.11.12.13.14.15]>], @timestamp=#<SNMP::TimeTicks:0x1af47e9d @value=55>, @generic_trap=6,
# @enterprise=[1.2.3.4.5.6], @source_ip="127.0.0.1", @agent_addr=#<SNMP::IpAddress:0x29a4833e @value="\xC0\xC1\xC2\xC3">,
# @specific_trap=99>
@rasputnik
rasputnik / gist:7334377
Created November 6, 2013 11:08
think this setup is wonky
(let [host "0.0.0.0"]
(tcp-server :host host)
(udp-server :host host)
(ws-server :host host))
; keep data for 5 minutes, just throw into index
(let [index (default :ttl 300 (update-index (index)))
graph (graphite {:host "graphite.cf.ac.uk"
:protocol :udp
:pool-size 10})]
@rasputnik
rasputnik / gist:7561122
Created November 20, 2013 10:43
how to build a statsd RPM using FPM.
# get required build bits
yum install -y jdk jruby nodejs rpm-build
# setup jruby (add /opt/jruby/bin to your path)
jgem install fpm
# checkout statsd
@rasputnik
rasputnik / gist:8257020
Last active January 2, 2016 05:29
Dirt simple riemann config to listen on all interfaces (so docker can map ports in).
(let [host "0.0.0.0"]
(tcp-server :host host)
(udp-server :host host)
(ws-server :host host))
@rasputnik
rasputnik / gist:8275293
Last active January 2, 2016 08:19
dockerfile to run riemann on openjdk7 , centos6.5
# build up an openjdk stack on centos 6 to run riemann rpm
#
# docker build -t 'your/riemann' <thisfile>
#
# then run with:
# docker run -P -d your/riemann
FROM saltstack/centos-6-minimal
MAINTAINER Dick Davies <dick@hellooperator.net>
@rasputnik
rasputnik / gist:8302058
Created January 7, 2014 16:35
redis dockerfile (sample)
# build image with:
#
# docker build -t 'your/redis' <directory holding this file>
#
# run with:
# docker run -P -name redis1 -d your/redis
FROM base
MAINTAINER Dick Davies <dick@hellooperator.net>
@rasputnik
rasputnik / gist:8425116
Created January 14, 2014 20:30
postgresql 9.3 (transient) Dockerfile on centos6.
postgresql-9:$ cat Dockerfile
# postgresql 9 on centos 6.5
#
# docker build -t 'your/pg' <thisfile>
#
# then run with:
# docker run -P -d your/pg
# tweakables are the 'ENV' lines further down
# (if they were higher up they'd blow the cache)
@rasputnik
rasputnik / gist:8548388
Created January 21, 2014 21:06
overriding an existing resource with class inheritance
# modules/atlassian/manifests/gitfix.pp
class atlassian::gitfix inherits git::packages {
Package['git'] { ensure => absent }
}