Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jfouse on github.
  • I am jfouse (https://keybase.io/jfouse) on keybase.
  • I have a public key ASAsTEZFHSKwZLBSB-62u8oPnWFoM7y3RIwnlj6DF_44Ago

To claim this, I am signing this object:

@jfouse
jfouse / shred.rb
Last active August 27, 2015 15:11
Ruby file/folder shredding
def cleanup(target)
if FileTest.file?(target)
shred(target)
else
Find.find(File.absolute_path(target)) do |thing|
if FileTest.file?(thing)
shred(thing)
end
end
end
@jfouse
jfouse / gist:07a97311b81218f40d95
Created December 19, 2014 19:33
find-ec2-instance.sh
#!/bin/bash
# Intention: when receiving seemingly-random emails from Amazon Web Services that some EC2 instance will be rebooted,
# it would be handy to be able to easily identify the instance to know if you need to take further action either before
# or after the stated maintenance action. Unfortunately, the email only gives the instance ID and region. If you're
# maintaining multiple AWS accounts it quickly becomes cumbersome to locate the instance in question. This small script
# can help with that. Nothing fancy, just a quick convenience script to go do your searching for you.
#
# This script assumes two things:
# 1. you have the AWS cli installed: http://aws.amazon.com/cli/