Skip to content

Instantly share code, notes, and snippets.

View mbi's full-sized avatar

Marco Bonetti mbi

View GitHub Profile
@dideler
dideler / upgrade-postgres-9.3-to-9.4.md
Last active November 23, 2025 10:07
Upgrading PostgreSQL from 9.3 to 9.4 when upgrading Ubuntu 14.04 to 14.10

TL;DR

Create a backup:

pg_dumpall > mybackup.sql

Perform the upgrade:

sudo pg_dropcluster 9.4 main --stop
@runekaagaard
runekaagaard / pgx.rst
Last active May 14, 2025 13:41
Bash scripts for extracting individual databases from a sql file dumped using pg_dumpall

Postgresql Xtra commands

  • pgx_list_dbs: Lists the names of databases in an .sql file dumped using pg_dumpall.
  • pgx_extract_db: Extracts a single database from a sql file dumped with pg_dumpall and outputs its content to stdout.

Installation

@timmyomahony
timmyomahony / postprocess_sekizai.py
Created October 25, 2011 01:11
django-sekizai postprocessor for enabling django-compressor compatibility
"""
Get django-sekizai, django-compessor (and django-cms) playing nicely together
re: https://github.com/ojii/django-sekizai/issues/4
using: https://github.com/jezdez/django_compressor.git
and: https://github.com/ojii/[email protected]
"""
from compressor.templatetags.compress import CompressorNode
from django.template.base import *
def compress(data, name):