Skip to content

Instantly share code, notes, and snippets.

Matthew Macdonald-Wallace proffalken

View GitHub Profile
lusis /
Last active Jun 16, 2020
terraform template to generate serverspec properties

This uses terraform's template_file resource to generate a yaml properties file for serverspec to use.

  • create the Rakefile in your terraform project root
  • create a spec directory and put spec_helper.rb in it
  • create the templates/properties.tmpl.yml file
  • create the
  • terraform apply


Tests will be matched based on roles defined for a given node.

anonymous / gist:fd5ed9075cc026acc607
Created Dec 16, 2014
Quick Container Check
View gist:fd5ed9075cc026acc607
#!/usr/bin/env python
from docker import Client
import json
d = Client(base_url='unix://var/run/docker.sock')
containers = d.containers()
metrics = {
'/redis': '1',
wangqiang8511 / kibana_aws_cloudwatch
Last active Aug 29, 2015
Kibana portal for aws infra cloudwatch monitoring
View kibana_aws_cloudwatch
"title": "AWS Infra Monitoring",
"services": {
"query": {
"list": {
"0": {
"query": "name:writelatency",
"alias": "",
"color": "#7EB26D",
"id": 0,
steintore /
Last active Jun 21, 2017
Build status and progress widget for Dashing


Dashing widget to display a Jenkins build status and build progress

The widget is based on the meter-widget which is default in the Dashing installation

The widget can also see the progress of a "pre-build", i.e if you have a job triggering the actual build you want to define, you can configure this job in the jenkins_build.rb as a prebuild.

For more information, please see Coding Like a tosser

dcarley / rabbitmq-server-plugins.spec
Created May 3, 2011
RPM SPEC for RabbitMQ plugins
View rabbitmq-server-plugins.spec
Name : rabbitmq-server-plugins
Version : 2.6.1
Release : 2
Summary : Plugins for RabbitMQ server
Group : Development/Libraries
Source0 :{version}/amqp_client-%{version}.ez
Source1 :{version}/rabbitmq_stomp-%{version}.ez
Source2 :{version}/rabbitmq_management_agent-%{version}.ez
Source3 :{version}/rabbitmq_management-%{version}.jquery-fix.ez
kmile / xml_parser.rb
Created Feb 15, 2011
A small nokogiri xml reader DSL.
View xml_parser.rb
# A small DSL for helping parsing documents using Nokogiri::XML::Reader. The
# XML Reader is a good way to move a cursor through a (large) XML document fast,
# but is not as cumbersome as writing a full SAX document handler. Read about
# it here:
# Just pass the reader in this parser and specificy the nodes that you are interested
# in in a block. You can just parse every node or only look inside certain nodes.
# A small example:
jordansissel / Better
Created Dec 20, 2010
Strip package scripts from .deb packages (postinst, postrm, preinst, prerm)
View Better

The best way to use this tool is to hook apt's use of dpkg to run it before doing any package installs.

In your apt.conf, put this:

DPkg::Pre-Install-Pkgs {"xargs -rL1 bash /path/to/ 2>&1 | logger -t stripdeb"}

Then, a demo:

% sudo apt-get install mysql-server-5.1
View api.feature
Scenario: Get List of My Hitchhiking Items via API
Given the existing things:
|The Guide (duh)|
|A towel|
|Sub-Etha Sens-O-Matic|
|Pan Galactic Gargle Blaster|
|Kill-o-Zap blaster pistol|
And the existing accounts:
You can’t perform that action at this time.