Skip to content

Instantly share code, notes, and snippets.

View copernicus's full-sized avatar

Nicolaus Copernicus copernicus

View GitHub Profile
@copernicus
copernicus / ec2-metadata
Created April 20, 2012 13:00 — forked from yaronf/ec2-metadata
ec2-metadata: a simple tool for exploring Amazon EC2 metadata, extended with network and VPC info
#!/bin/bash
#
#########################################################################
#This software code is made available "AS IS" without warranties of any #
#kind. You may copy, display, modify and redistribute the software #
#code either by itself or as incorporated into your code; provided that #
#you do not remove any proprietary notices. Your use of this software #
#code is at your own risk and you waive any claim against Amazon #
#Digital Services, Inc. or its affiliates with respect to your use of #
#this software code. (c) 2006-2007 Amazon Digital Services, Inc. or its #
@copernicus
copernicus / Gemfile
Created November 19, 2012 14:11 — forked from SeanJA/Gemfile
pageviews widget for dashing
gem 'garb', :git => 'git://github.com/Sija/garb.git'
@copernicus
copernicus / aws.rb
Created February 6, 2013 13:05 — forked from cwgem/aws.rb
def describe_pvgrub_images()
headers = ["Image ID", "Name", "Description", "Architecture", "Kernel ID"]
values = []
AWS.memoize do
@ec2.images.with_owner('amazon').filter('name', '*grub*').each do | i |
values << [i.id, i.name, i.description, i.architecture, i.kernel_id]
end
end
# gem install aws-sdk
require 'aws'
PRICE_PER_GB_MONTH = 0.11
ACCESS_KEY = '...'
SECRET_KEY = '...'
ENDPOINT = 'eu-west-1.ec2.amazonaws.com'
#!/usr/bin/env python
import boto
from boto.sqs.message import RawMessage
import tempfile
import json
import logging
import argparse
import gzip
import redis