Skip to content

Instantly share code, notes, and snippets.

@jakeyr
jakeyr / safe.md
Created November 29, 2016 17:57 — forked from bryanrite/safe.md
Safe Postgres Operations on High Volume Tables

Originally taken from: Braintree Article and expanded on by me.

Safe

  • Add a new column
  • Drop a column
  • Rename a column
  • Add an index concurrently (Example), Note: it will still take a long time to run the migration, but it won't write-lock the table.
  • Drop a constraint (for example, non-nullable)
  • Add a default value to an existing column
@jakeyr
jakeyr / GridHubInstall.ps1
Last active August 29, 2015 14:26 — forked from dlai0001/GridHubInstall.ps1
Boxstarter formula for settings up Selenium Grid
##############################################################################################
# Powershell script for installing Selenium Grid Extras in Hub Mode
# Navigate with internet explorer to:
# http://boxstarter.org/package/nr/url? + raw gist url
#
##############################################################################################
# Boxstarter options
$Boxstarter.RebootOk=$true # Allow reboots?
$Boxstarter.NoPassword=$false # Is this a machine with no login password?
@jakeyr
jakeyr / squid.bash
Created April 26, 2012 00:07 — forked from noahcampbell/squid.bash
Collectd script for squid
# Steps for turning on squid monitoring (until I have an rpm)
cat > /etc/collectd/conf/squid << EOF
LoadPlugin exec
<Plugin exec>
Exec deploy "/var/lib/releng/monitoring/squid"
</Plugin>
EOF
mkdir -p /var/lib/releng/monitoring
@jakeyr
jakeyr / heroku.coffee
Created December 31, 2011 07:48
Heroku Hubot Script
# A limited way to interact with the Heroku API.
#
# INSTALLATION:
# 1. Create file in scripts folder in hubot folder
# 2. Update package.json for hubot and add dependency on "sprintf": "0.1.1"
# 3. Set heroku config variable HEROKU_USER to heroku user account to use
# 4. Set heroku config variable HEROKU_APIKEY to heroku user account apikey (from My Account page)
#
# heroku status - Retrieve the most recent tweet from the @herokustatus account
# heroku ps --app <appname> - Get process information for application