Skip to content

Instantly share code, notes, and snippets.

View jdowning's full-sized avatar
😇

Justin Downing jdowning

😇
View GitHub Profile
@jdowning
jdowning / confluence-rename-users.sql
Created May 18, 2012 12:46 — forked from ssbarnea/confluence-rename-users.sql
Confluence user renaming PostgreSQL stored procedure.
DECLARE vdir integer;
BEGIN
-- BEGIN;
-- ^not needed for stored procedure
CREATE TABLE IF NOT EXISTS usermigration
(
oldusername character varying(255) NOT NULL,
@jdowning
jdowning / gist:3295929
Created August 8, 2012 15:27 — forked from sstephenson/gist:1120938
Quick guide to installing rbenv
# Clone rbenv into ~/.rbenv
git clone git@github.com:sstephenson/rbenv.git ~/.rbenv
# Add rbenv to your PATH
# NOTE: rbenv is *NOT* compatible with rvm, so you'll need to
# remove rvm from your profile if it's present. (This is because
# rvm overrides the `gem` command.)
echo 'export PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH"' >> ~/.bash_profile
exec $SHELL
@jdowning
jdowning / gist:3343404
Created August 13, 2012 19:16
Enable multiverse for Ubuntu Precise 12.04
sudo sed -i "33,36s/^# //g" /etc/apt/sources.list
@jdowning
jdowning / gist:3946896
Created October 24, 2012 15:53
Install Postgresql 9.2 on Ubuntu
aptitude install -y python-software-properties
add-apt-repository -y ppa:pitti/postgresql
aptitude update
aptitude install -y postgresql-9.2 postgresql-server-dev-9.2
@jdowning
jdowning / gist:4156780
Created November 27, 2012 20:24
Twitter Crashing on Mac OSX 10.8.2
Process: Twitter [29188]
Path: /Applications/Twitter.app/Contents/MacOS/Twitter
Identifier: com.twitter.twitter-mac
Version: 2.1.1 (2.1.1)
App Item ID: 409789998
App External ID: 3768515
Code Type: X86-64 (Native)
Parent Process: launchd [223]
User ID: 501
@jdowning
jdowning / github-status.coffee
Last active December 12, 2015 03:48
Hubot script for GitHub Status
# Description:
# Get GitHub status
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
@jdowning
jdowning / vagrant-clean.sh
Last active December 13, 2021 06:59
Script to clean up Ubuntu Vagrant box before packaging
#!/bin/bash
# This script zeroes out any space not needed for packaging a new Ubuntu Vagrant base box.
# Run the following command in a root shell:
#
# bash <(curl -s https://gist.github.com/justindowning/5670884/raw/vagrant-clean.sh)
function print_green {
echo -e "\e[32m${1}\e[0m"
}
@jdowning
jdowning / ami-clean.sh
Last active December 26, 2023 20:09
Script to clean up Ubuntu EC2 instance before packaging as an AMI
#!/bin/bash
# This script cleans up your EC2 instance before baking a new AMI.
# Run the following command in a root shell:
#
# bash <(curl -s https://gist.github.com/justindowning/5921369/raw/ami-clean.sh)
function print_green {
echo -e "\e[32m${1}\e[0m"
}
@jdowning
jdowning / Puppetfile
Created August 26, 2013 18:24
PostgreSQL Cluster for Vagrant
forge "http://forge.puppetlabs.com"
mod "puppetlabs/apt"
mod "puppetlabs/ntp"
mod "puppetlabs/stdlib"
mod "puppetlabs/postgresql"
@jdowning
jdowning / hosts
Created October 10, 2013 16:56
Run an `mtr --report` on a list of hosts and email the results
google.com
yahoo.com
amazon.com