Skip to content

Instantly share code, notes, and snippets.

View mgagne's full-sized avatar

Mathieu Gagné mgagne

View GitHub Profile
@tamoyal
tamoyal / gist:2ea1fcdf99c819b4e07d
Last active February 13, 2020 11:24
Upgrade Postgres 9.3 to 9.4 on Ubuntu
# Be sure to save your config files. Optional but I do:
sudo cp /etc/postgresql/9.3/main/postgresql.conf ~
sudo cp /etc/postgresql/9.3/main/pg_hba.conf ~
# Package repo (for apt-get)
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" >> /etc/apt/sources.list.d/postgresql.list'
# Also probably optional but I like to update sources and upgrade
sudo apt-get update
@mindjiver
mindjiver / initial_user.sql.erb
Created June 1, 2014 16:12
Create initial user in Gerrit
-- Insert the base values for the intial Gerrit user. This user will
-- become the administrator of the server. As this user is a local
-- user it will not be able to login through the web UI.
-- Create a local user, we need to insertions for this.
INSERT INTO account_external_ids VALUES(1000000,
NULL,
NULL,
'username:<%= node['gerrit']['admin']['user_name'] %>');