Skip to content

Instantly share code, notes, and snippets.

Avatar

Johann du Toit johanndt

  • ImpulseCloud
  • Australia
View GitHub Profile
@johanndt
johanndt / gist:d32f5ccd248b415c203c1fcc131f23cc
Last active Jul 26, 2019
run pg_repack on existing running postgresql 9.6
View gist:d32f5ccd248b415c203c1fcc131f23cc
apt-get update
apt-get install postgresql-server-dev-11 unzip
cd /tmp
wget http://api.pgxn.org/dist/pg_repack/1.4.4/pg_repack-1.4.4.zip
unzip pg_repack-1.4.4.zip
cd pg_repack-1.4.4
make
make install
su - postgres
@johanndt
johanndt / upgrade-postgres-9.5-to-9.6.md
Last active Mar 26, 2017 — forked from Prototype-X/upgrade-postgres-9.5-to-9.6.md
Upgrading PostgreSQL from 9.5 to 9.6 on Ubuntu 16.04
View upgrade-postgres-9.5-to-9.6.md

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
@johanndt
johanndt / horizontal_legend.py
Created Oct 21, 2016
Lay out Toyplot legends horizontally
View horizontal_legend.py
from PIL import ImageFont
import toyplot
series_names = ["Series 1", "Series 2", "Series 3"]
canvas = toyplot.Canvas(width=300, height=300)
font = ImageFont.load_default()
next_x = 0
for legend in series_names:
canvas.legend([
View alignment5.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View alignment7.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View alignment6.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@johanndt
johanndt / upgrade-postgres-9.3-to-9.5.md
Last active Jul 6, 2020 — forked from dideler/upgrade-postgres-9.3-to-9.4.md
Upgrading PostgreSQL from 9.3 to 9.5 on Ubuntu
View upgrade-postgres-9.3-to-9.5.md

TL;DR

Install Postgres 9.5, and then:

sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main
@johanndt
johanndt / dual-axes2.ipynb
Created Nov 4, 2015
Toyplot combined bar and line plots
View dual-axes2.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@johanndt
johanndt / dual-axes.ipynb
Created Nov 4, 2015
Toyplot - Moved y axis to the right
View dual-axes.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.