Instantly share code, notes, and snippets.


Creates a basic CloudWatch Dashboard for an EC2 instance and it's EBS volumes.

usage: [-h] [--dashboard_name DASHBOARD_NAME]
                           [--skip_devices [SKIP_DEVICES [SKIP_DEVICES ...]]]
                           [--volume_group VOLUME_GROUP]
                           [--aws_profile AWS_PROFILE] [--dump]

Generate a CloudWatch Dashboard for an EC2 Instance

Required Gems

  • aws-sdk
  • terminal-table

Install: gem install aws-sdk terminal-table


Run ruby awsazs-update.rb to generate the JSON file.

Run ruby awsazs.rb to see the output:

View Gemfile
source ''
gem 'colorize'
gem 'inifile'
from datetime import datetime, timedelta
from tabulate import tabulate
from calendar import day_name
import sys
def wd(d):
return list(day_name)[d]
def sorted_week():
return sorted([(j+1)%7 for j in range(7)], key=lambda n: (n+1)%7)

Keybase proof

I hereby claim:

  • I am igorlg on github.
  • I am igorlg ( on keybase.
  • I have a public key ASDKo31X3pr6syAi9zz3oFyns-h0nk9evecYBjpm_dtaWwo

To claim this, I am signing this object:



Write a function that, given an input array of integers and a desired target_sum, returns the number of combinations, of any length, that add up to that target_sum.

import csv, sys
from datetime import date,datetime
def parse_budget(csvarr):
if '$' not in csvarr[4]:
return False
dt = datetime.strptime(csvarr[0], '%b %Y')
month = dt.month
year = dt.year
View ecs-autoscaing.json
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Template for a VPC with High Availability NAT for ECS",
"Parameters": {
"ClusterName": {
"Description": "The ECS Cluster Name",
"Type": "String"
"InstanceType": {
"Description": "NAT instance type",
View vpc-nat-ha.json
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Template for a VPC with High Availability NAT for ECS",
"Parameters": {
"NATInstanceType": {
"Description": "NAT instance type",
"Type": "String",
"Default": "t2.micro",
"AllowedValues": [