Skip to content

Instantly share code, notes, and snippets.

View Markbnj's full-sized avatar

Mark Betz Markbnj

View GitHub Profile
@Markbnj
Markbnj / ec2-discover-instances.py
Last active August 29, 2015 14:27
Discover ec2 instances by tag and tag value
from boto import ec2
class Resource(object):
"""
Represents a single resource returned from the Discovery class's
get_resources method.
"""
def __init__(self, host_name, private_host_name, ip, private_ip, tags):
self.__host_name = host_name
self.__private_host_name = private_host_name
@Markbnj
Markbnj / environment-specific-settings.py
Last active August 29, 2015 14:27
Environment-specific settings for python 2 modules
# Environment-specific settings for python 2 modules
# This code placed in __init__.py will allow a module to maintain
# environment-specific settings in files located in a settings folder
# within the module.
#
# Example:
#
# ├── mymodule.py
# ├── __init__.py