Skip to content

Instantly share code, notes, and snippets.

mdub / docker-compose.yml
Created Dec 21, 2017
buildkite agent with a side of Docker
View docker-compose.yml
version: "3.3"
shared: {}
image: docker:rc-dind
privileged: true
View .gitconfig
b = branch
ci = commit
co = checkout
l = log --oneline --decorate --graph
s = status
pr = pull --rebase
cleanup = !git branch --merged | grep -v '\\*\\|master\\|develop' | xargs -n 1 git branch -d
[url ""]
mdub / docker-compose.yml
Last active Sep 25, 2018
How to share a /usr/local/bundle cache between Ruby build jobs
View docker-compose.yml
version: "2"
image: ruby:2.3
- .:/project
- ruby2.3-bundle-cache:/usr/local/bundle
working_dir: /project

Keybase proof

I hereby claim:

  • I am mdub on github.
  • I am woollyams ( on keybase.
  • I have a public key ASDhdRjoPOFNNVYlC2L3dC52RKdigaxEKbBSWdMizDS9Ywo

To claim this, I am signing this object:

mdub / example_pact_matcher_spec.rb
Created Sep 6, 2015
Using Pact data-diffs for fun and profit
View example_pact_matcher_spec.rb
require "spec_helper"
require "pact/matchers"
require "pact/matchers/unix_diff_formatter"
require "term/ansicolor"
RSpec::Matchers.define :match_data do |expected|
match do |actual|
mdub / sublime-text-ruby-indentation-bug.rb
Created Oct 16, 2013
Weird indentation of Ruby data in Sublime Text
View sublime-text-ruby-indentation-bug.rb
# nested data usually auto-indents okay
x = {
:A => {
:a => 'a'
# but a comma after a brace throws things off
View yaml2json
#!/usr/bin/env ruby
require 'rubygems'
require 'json'
require 'yaml'
data = YAML.load(
puts JSON.pretty_generate(data)
View json2yaml
#!/usr/bin/env ruby
require 'rubygems'
require 'json'
require 'yaml'
JSON.create_id = "__disabled__"
data = JSON.parse(
YAML.dump(data, STDOUT)
mdub / aws-repl.rb
Last active Dec 23, 2018
A simple Ruby-based AWS console
View aws-repl.rb
#! /usr/bin/env ruby
# This is free and unencumbered software released into the public domain.
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
require 'aws-sdk'