Skip to content

Instantly share code, notes, and snippets.

View PurityControl's full-sized avatar

PurityControl

  • Leicester, United Kingdom
View GitHub Profile
@PurityControl
PurityControl / macports-postgres.org
Last active August 20, 2016 09:40
Install postgres on mac using ports and compile ruby pg gem
# set the version of postgresql for future commands
PG_VER=95

# install from ports
sudo port install postgresql$(PG_VER)-server

# initialize the database -> described in ports output
sudo mkdir -p /opt/local/var/db/postgresql$(PG_VER)/defaultdb
@PurityControl
PurityControl / perms.rb
Created November 5, 2015 12:06
Quick and dirty perms script for tansaku
names = ["Pablo", "Dan", "Andrew", "Tom", "Rob", "Jay", "Norm", "Yev"]
def make_pairs_from_perms perms
full_set = []
perms.each do |x|
z = []
x.each_slice(2){|y| z << y}
full_set << z
end