Skip to content

Instantly share code, notes, and snippets.

View kryskool's full-sized avatar

Christophe CHAUVET kryskool

View GitHub Profile
@kryskool
kryskool / backup_db.sh
Created September 26, 2012 07:29 — forked from matrixise/backup_db.sh
Backup all the OpenERP databases and the associated filestores
#!/usr/bin/env bash
ROOT_BACKUP_PATH=/tmp/backup
echo "backup path: ${ROOT_BACKUP_PATH}"
# Create the backup directory
[ -d "$ROOT_BACKUP_PATH" ] || mkdir -p $ROOT_BACKUP_PATH
DATABASES=`psql -ltA -d postgres -c "SELECT datname FROM pg_database WHERE datname NOT IN ('postgres', 'template0', 'template1')"`
@kryskool
kryskool / profile_view_load
Created February 5, 2018 14:20 — forked from hbrunn/profile_view_load
profile_view_load
#!/usr/bin/env python2
from argparse import ArgumentParser
parser = ArgumentParser(
description='Profile loading a model\'s data for a specific view in order '
'to find bottlenecks')
parser.add_argument('odoo_basedir')
parser.add_argument('odoo_cfg')
parser.add_argument('odoo_db')