Skip to content

Instantly share code, notes, and snippets.

View donnoman's full-sized avatar

Donovan Bray donnoman

View GitHub Profile
@weavenet
weavenet / delete_all_object_versions.sh
Created May 4, 2015 05:21
Delete all versions of all files in s3 versioned bucket using AWS CLI and jq.
#!/bin/bash
bucket=$1
set -e
echo "Removing all versions from $bucket"
versions=`aws s3api list-object-versions --bucket $bucket |jq '.Versions'`
markers=`aws s3api list-object-versions --bucket $bucket |jq '.DeleteMarkers'`
@jderrett
jderrett / copy_librato_instrument.rb
Last active August 29, 2015 14:15
Copy a Librato instrument
#!/usr/bin/env ruby
require 'faraday'
require 'faraday_middleware'
require 'json'
require 'pry'
class LibratoApi
ENDPOINT = 'https://metrics-api.librato.com/v1'