Skip to content

Instantly share code, notes, and snippets.

View delameko's full-sized avatar

Matt Slater delameko

View GitHub Profile
@delameko
delameko / upgrade-postgres-9.5-to-9.6.md
Last active August 22, 2023 08:22 — forked from johanndt/upgrade-postgres-9.3-to-9.5.md
Upgrading PostgreSQL from 9.5 to 9.6 on Ubuntu 16.04

TL;DR

Install Postgres 9.6, and then:

sudo pg_dropcluster 9.6 main --stop
sudo pg_upgradecluster 9.5 main
sudo pg_dropcluster 9.5 main
@delameko
delameko / gist:184e4d3a4971a17314443afa0a4df0bd
Created July 13, 2016 17:21 — forked from koudelka/gist:f4d07b9d998d723e55a0
Possible http status codes module for Elixir Phoenix Web Framework
#
# Would this be useful to Phoenix?
#
# In controllers, it'd be nice to be able to refer to status codes as atoms instead of integers.
#
defmodule Phoenix.Controller.StatusCodes do
@http_status_codes %{
@delameko
delameko / 0_reuse_code.js
Last active August 29, 2015 14:26
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@delameko
delameko / .gemrc
Last active August 29, 2015 14:18 — forked from jch/.gemrc
A .gemrc example
# http://guides.rubygems.org/command-reference/#gem-environment
---
gem: --no-ri --no-rdoc
benchmark: false
verbose: true
update_sources: true
backtrace: true
bulk_threshold: 1000
@delameko
delameko / pow_port.rb
Created January 16, 2012 15:31 — forked from dhrrgn/pow_port.rb
Quickly and easily change the port that Pow is running on. This allows you too run Apache and Pow side-by-side (on different ports of course).
#!/usr/bin/env ruby
# Pow Port
#
# Quickly and easily change the port that Pow is running on. This allows
# you too run Apache and Pow side-by-side (on different ports of course).
#
# WARNING: This will OVERWRITE your ~/.powconfig file. If you have custom
# configurations in there, please back it up first.
#
@delameko
delameko / append_bundle_exec.sh
Last active September 28, 2015 12:28 — forked from tapajos/gist:1433859
Script to automatically append 'bundle exec' to the start of a command if there is a Gemfile in the folder.
function rake {
if [ -e Gemfile ]; then
bundle exec rake $@
else
`which rake` $@
fi
}
function rspec {
if [ -e Gemfile ]; then