Skip to content

Instantly share code, notes, and snippets.


Matt Button BRMatt

View GitHub Profile
BRMatt / tf-multitaint
Last active Aug 6, 2018
A small utility for tainting a bunch of terraform resources in one go `terraform state list | grep launch_configuration | tf-multitaint`
View tf-multitaint
#!/usr/bin/env ruby
resources = $ do |resource|
module: resource.scan(%r{module\.([a-z0-9\-_]+)}).to_a.join("."),
identifier: resource.match(%r{(?:module\.[a-z0-9\-_]+\.)*(.*)$}).captures.first,
resources.each do |resource|
View bar-chart.json
"x_axis": {
"labels": [

Keybase proof

I hereby claim:

  • I am brmatt on github.
  • I am thatmatt ( on keybase.
  • I have a public key ASCzUvNoJaxPkxvJVoltLkDSfhTvX6CmR-9V0V5ulm4CXgo

To claim this, I am signing this object:

View example.rb
require 'oauth2'
client =
:site => '',
:authorize_url => '/oauth'
redirect_to client.auth_code.authorize_url
View gist:8032846a8d06e667fa0a
SELECT "posts".*, "authors".*
FROM "posts"
LEFT JOIN "authors" ON ("posts"."author_id" = "authors"."author_id");
View bug.rb
# Activate the gem you are reporting the issue against.
gem 'activerecord', if ENV['RAILS_3'] then '3.2.19' else '4.1.6' end
require 'active_record'
require 'minitest/autorun'
require 'logger'
# Ensure backward compatibility with Minitest 4
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
# This connection will do for database-independent bug reports.
View plugin.php
add_filter('memberful_wp_after_sign_in_url', 'my_after_sign_in_url');
function my_after_sign_in_url() {
return '';
View example.php
// This will dump information about all plans the currently signed in member has access to
// This will print all downloads the currently signed in member has access to, including those granted by a subscription
var_dump(memberful_wp_user_downloads( wp_get_current_user()->ID ));
// You can also pass the id of a specific user to get the plans for that specific user. E.g
View gist:9336810
#!/usr/bin/env ruby
require "openssl"
require 'digest/sha2'
require 'base64'
# We use the AES 256 bit cipher-block chaining symetric encryption
alg = "AES-256-CBC"
# We want a 256 bit key symetric key based on some passphrase
digest =