Skip to content

Instantly share code, notes, and snippets.

View irlevesque's full-sized avatar

Ian Levesque irlevesque

View GitHub Profile
|____all_aws
| |____ec2.ini
| |____ec2.py
| |____group_vars
| | |____all
| |____shared
|____development
| |____ec2.ini
| |____ec2.py
| |____group_vars
@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
}
@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