I hereby claim:
- I am irlevesque on github.
- I am irl (https://keybase.io/irl) on keybase.
- I have a public key ASDvA4kEk0yWBmP3lXUt8B0lYezyQ1dRZB6oKHjr4A79Qwo
To claim this, I am signing this object:
#!/bin/bash | |
usage() | |
{ | |
cat << EOF | |
usage: $0 options | |
This script set ownership for all table, sequence and views for a given database | |
Credit: Based on http://stackoverflow.com/a/2686185/305019 by Alex Soto |
# If we're in a git repo, print the first 9 characters of the current committish. | |
function parse_git_commit() { | |
git rev-parse HEAD 2>/dev/null | cut -c1-10 | |
} | |
# If we're in a git repo, print the current branch name. The sed call deletes | |
# any line not starting with '* ', then removes the '* ' | |
function parse_git_branch () { | |
git rev-parse --abbrev-ref HEAD 2>/dev/null | |
} |
|____all_aws | |
| |____ec2.ini | |
| |____ec2.py | |
| |____group_vars | |
| | |____all | |
| |____shared | |
|____development | |
| |____ec2.ini | |
| |____ec2.py | |
| |____group_vars |
|____all_aws | |
| |____ec2.ini | |
| |____ec2.py | |
| |____group_vars | |
| | |____all | |
| |____shared | |
|____development | |
| |____ec2.ini | |
| |____ec2.py | |
| |____group_vars |
|____all_aws | |
| |____ec2.ini | |
| |____ec2.py | |
| |____group_vars | |
| | |____all | |
| |____shared | |
|____development | |
| |____ec2.ini | |
| |____ec2.py | |
| |____group_vars |
>>> from jinja2 import Template | |
>>> tmpl = """{% if name != "Jeff" %}Nothing to see here move along{% else %} | |
... hello {{name}}, how are you?{% endif %}""" | |
>>> template = Template(tmpl) | |
>>> print template.render({"name": "Jeff"}) | |
hello Jeff, how are you? | |
>>> print template.render({"name": "John"}) | |
Nothing to see here move along | |
>>> |
I hereby claim:
To claim this, I am signing this object:
diff -u a/SConstruct b/SConstruct | |
--- a/SConstruct 2015-10-04 14:03:55.000000000 +0100 | |
+++ b/SConstruct 2015-10-04 14:04:47.000000000 +0100 | |
@@ -307,7 +307,7 @@ | |
0, False) | |
if darwin: | |
- osx_version_choices = ['10.6', '10.7', '10.8', '10.9'] | |
+ osx_version_choices = ['10.6', '10.7', '10.8', '10.9', '10.10', '10.11', '10.12'] | |
add_option("osx-version-min", "minimum OS X version to support", 1, True, |
#!/bin/bash | |
# | |
# vault-ec2-auth.sh | |
# Authenticates an EC2 instance to Hashicorp Vault | |
# | |
# configuration stored in environment variables in /etc/vault/client.conf | |
# expected configuration (defaults are selected below if none is specified): | |
# VAULT_ADDR = url of vault server | |
# VAULT_ROLE = role name to authenticate as |
This is a python 2 snippet showing how to generate headers to authenticate with HashiCorp's Vault using the AWS authentication method.
It will look for credentials in the
default boto3 locations;
if you need to supply custom credentials (such as from an AssumeRole
call), you would use the
botocore.session.set_credentials
method before calling create_client
.