Skip to content

Instantly share code, notes, and snippets.

View irlevesque's full-sized avatar

Ian Levesque irlevesque

View GitHub Profile
@irlevesque
irlevesque / change_db_owner.sh
Created August 14, 2012 15:15 — forked from gingerlime/change_db_owner.sh
Postgresql - Changing ownership on all tables
#!/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
@irlevesque
irlevesque / .bashrc
Created July 23, 2015 01:00
Git prompt
# 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
@irlevesque
irlevesque / jinja2_templating.py
Created September 7, 2016 14:08
Testing jinja templating in python REPL
>>> 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
>>>
@irlevesque
irlevesque / readme.md
Created September 15, 2016 17:42
keybase

Keybase proof

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:

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
@irlevesque
irlevesque / README.md
Created June 6, 2017 20:33 — forked from joelthompson/README.md
Vault Auth