Skip to content

Instantly share code, notes, and snippets.

View maiksprenger's full-sized avatar

Maik Sprenger maiksprenger

View GitHub Profile
[options]
#
# WARNING:
# If you use the Odoo Database utility to change the master password be aware
# that the formatting of this file WILL be LOST! A copy of this file named
# /etc/odoo/openerp-server.conf.template has been made in case this happens
# Note that the copy does not have any first boot changes
#-----------------------------------------------------------------------------
# Odoo Server Config File - TurnKey Linux
@maiksprenger
maiksprenger / shopware.py
Last active December 26, 2021 14:48
Basic Python 3 Shopware API client
"""
A basic Shopware 5 API client I threw together for a project. There's a few gotchas in here that
I thought are useful enough to others to publish it. But please take it as is - it works for my
purpose (processing Shopware articles daily), I make no claims beyond that.
"""
import logging
import os
import requests
@jonasvp
jonasvp / pre-commit
Created March 7, 2011 08:29
My .git/hooks/pre-commit - save yourself from embarassment using pyflakes
#!/bin/bash
TMPDIR=`mktemp -d`
TMPFILE=`mktemp`
git diff --cached --name-only --diff-filter=ACMR | xargs git checkout-index --prefix=$TMPDIR/ --
pyflakes $TMPDIR >$TMPFILE 2>&1
grep -v "unable to detect undefined names" $TMPFILE >$TMPFILE.2
egrep -v "migrations.*'(datetime|models)' imported but unused" $TMPFILE.2 >$TMPFILE
grep -rn "pdb.set_trace" $TMPDIR >>$TMPFILE
sed "s/^${TMPDIR//\//.}.//" $TMPFILE >$TMPFILE.2