This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# | |
# Example code for specifying multiple dimensions in a | |
# query of Amazon EC2 CloudWatch using the boto library. | |
# | |
# Boto may be downloaded here: http://code.google.com/p/boto | |
from datetime import datetime, timedelta | |
from boto import connect_cloudwatch | |
from boto.ec2.cloudwatch.metric import Metric |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ssh-instance - function to let you SSH to an EC2 instance ID | |
# Written by Mike Babineau <michael.babineau@gmail.com>. Original here: https://gist.github.com/mbabineau/319882/ | |
# Put this in ~/.profile and reload your terminal | |
function ssh-instance() { | |
if [ $# -lt 1 ] || [ $# -gt 3 ]; then | |
echo "Usage: ssh-instance [-r region] <instance id>" | |
else | |
case "$1" in | |
"-r") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
<script type="text/javascript" src="/static/js/jquery.cascade.js"></script> | |
<script type="text/javascript" src="/static/js/jquery.templating.js"></script> | |
<script type="text/javascript"> | |
// Set up dropdown menu items for Cascade | |
var az_list = [ | |
{'When':'AZ','Value':'Phoenix','Text':'Phoenix'}, | |
{'When':'AZ','Value':'Tucson','Text':'Tucson'}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This knife.rb orig. provided by jtimberman@opscode.com - but any mistakes are mine! | |
current_dir = File.dirname(__FILE__) | |
platform = "https://api.opscode.com/organizations" | |
require 'grit' | |
branch = Grit::Repo.new("#{current_dir}/..").head.name | |
case branch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import urllib2 | |
from jabberbot import JabberBot, botcmd | |
import boto | |
class EA2DJabberBot(JabberBot): | |
def __init__(self, *args, **kwargs): | |
super(EA2DJabberBot, self).__init__(*args, **kwargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import redis.clients.jedis.Jedis | |
/** | |
* Handles the delaying of queued messages for later retrieval. | |
* See http://blog.mikebabineau.com/2013/02/09/delay-queues-in-redis/ | |
*/ | |
class DelayQueueService { | |
def redisService | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AWSTemplateFormatVersion" : "2010-09-09", | |
"Description" : "Launches a Docker Registry.", | |
"Parameters" : { | |
"InstanceType" : { | |
"Description" : "EC2 instance type", | |
"Type" : "String", | |
"Default" : "m1.small", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ grep eda431d7-4a74-11e4-a320-56847afe9799 /var/log/mesos/mesos-slave.INFO | |
I1002 20:44:39.176024 1528 slave.cpp:1002] Got assigned task serialization.eda431d7-4a74-11e4-a320-56847afe9799 for framework 20140919-224934-1593967114-5050-1518-0000 | |
I1002 20:44:39.176257 1528 slave.cpp:1112] Launching task serialization.eda431d7-4a74-11e4-a320-56847afe9799 for framework 20140919-224934-1593967114-5050-1518-0000 | |
I1002 20:44:39.177287 1528 slave.cpp:1222] Queuing task 'serialization.eda431d7-4a74-11e4-a320-56847afe9799' for executor serialization.eda431d7-4a74-11e4-a320-56847afe9799 of framework '20140919-224934-1593967114-5050-1518-0000 | |
I1002 20:44:39.191769 1528 docker.cpp:743] Starting container '1d337fa3-8dd3-4b43-9d1e-a774cbcbc22f' for task 'serialization.eda431d7-4a74-11e4-a320-56847afe9799' (and executor 'serialization.eda431d7-4a74-11e4-a320-56847afe9799') of framework '20140919-224934-1593967114-5050-1518-0000' | |
I1002 20:44:43.707033 1521 slave.cpp:1278] Asked to kill task serialization.eda431d7-4a74-11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import json | |
import boto | |
import requests | |
from flask import Flask, render_template | |
from babelchart.sources.cloudwatch import CloudWatchSource | |
from babelchart.sinks.googlecharts import GoogleChartsSink | |
from babelchart.sources.graphite import GraphiteSource |