Skip to content

Instantly share code, notes, and snippets.

ansible-playbook release.yml --extra-vars "version=1.23.45 other_variable=foo"
#!/usr/bin/python
"""
@author Sam (i-sam on github)
@description: tool for manage aws SG over the regions
It requires boto package and set env variables
AWS_ACCESS_KEY_ID,
AWS_SECRET_ACCESS_KEY
AWS_REGIONS (optional)
Usage example to add new rule for DEV-ENV SG:
#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
def _broadcast(self, command, arguments=None, destination=None,
reply=False, timeout=1, limit=None,
callback=None, channel=None):
if destination is not None and \
not isinstance(destination, (list, tuple)):
raise ValueError(
'destination must be a list/tuple not {0}'.format(
type(destination)))
arguments = arguments or {}
@i-sam
i-sam / gist:7806136
Last active December 30, 2015 08:59
def rget(hash, li):
el = li.pop(0)
if li:
return rget(hash.get(el), li)
else:
return hash[el] if hash else None
rget(ec_list, ['DescribeCacheClustersResponse',
'DescribeCacheClustersResult',
'CacheClusters',