Skip to content

Instantly share code, notes, and snippets.

@bvarent
bvarent / TExceptionSetterMethods.php
Created June 17, 2016 14:52
add setter methods to a PHP Exception
<?php
namespace My\Exception;
use Exception;
use ReflectionProperty;
/**
* Fluent cq chaining setter methods for an Exception class.
* To set or modify an Exception's properties after construction.
*
@bvarent
bvarent / 04-grab-env-config-from-bucket subdir eb_env_descr.py
Created December 9, 2015 19:15
AWS EB ebextensions grab environment config from bucket
#!/usr/bin/env python
#source: https://gist.github.com/heywbj/da10d99f66df6361db9f
import boto.utils
import boto.beanstalk
good_statuses = ('Launching', 'Updating', 'Ready')
def get_eb_environment_description():
identity_document = boto.utils.get_instance_identity()['document']