Skip to content

Instantly share code, notes, and snippets.

View mattgray's full-sized avatar

Matt Gray mattgray

View GitHub Profile
@mattgray
mattgray / gist:7526622
Last active December 28, 2015 16:09
Logstash spec generator with nested fields
describe "can handle fields that are are objects" do
tmpfile = Tempfile.new('logstash-spec-output-csv')
config <<-CONFIG
input {
generator {
message => "{\"foo\":{\"one\":\"two\"},\"baz\": \"quux\"}"
count => 1
}
}
output {
@mattgray
mattgray / .kitchen.local.yml
Created December 23, 2014 17:10
Test Kitchen .kitchen.local.yml to enable Virtualbox Vagrant backend to use Host DNS for VPN
driver:
name: vagrant
customize:
natdnshostresolver1: 'on'
@mattgray
mattgray / gist:8cee4b23bd6d4e415c86
Created February 6, 2015 18:27
how to make mirage work
1 sudo add-apt-repository ppa:avsm/ocaml41+opam12
2 apt-add-repository
3 sudo apt-get install software-properties-common
4 sudo apt-get install build-essential
5 add-apt-repository ppa:avsm/ocaml41+opam12
6 sudo add-apt-repository ppa:avsm/ocaml41+opam12
7 sudo apt-get update
8 sudo apt-get install opam ocaml-native-compilers camlp4-extra
9 opam init
10 source .bashrc
package main
import (
"fmt"
"io"
"os"
)
func main() {