Skip to content

Instantly share code, notes, and snippets.

@tinogis
tinogis / pep8-git.sh
Created February 11, 2013 12:28
PEP8 només dels fitxers modificats (git status)
#!/bin/bash
pep8 $(git status -s | grep '\.py$' | cut -c3-)
@tinogis
tinogis / treure_constraints.sh
Last active December 11, 2015 02:28
Neteja constraints de FPCC_tarifa
for i in `psql -l -A -t | grep -v 'postgres' | grep -v 'proxy'| cut -d '|' -f 1 `; do
psql -d $i -c "alter table giscedata_liquidacio_fpcc_tarifa DROP CONSTRAINT giscedata_liquidacio_fpcc_tarifa_tarifa_uniq;" ;
done
@tinogis
tinogis / svn_diff_liquidacio.diff
Created January 14, 2013 09:34
Diff a liquidacions
@@ -366,6 +366,8 @@
n = doc.createElement("DIPE_FACT_ENERGIA")
facturacion.appendChild(n)
+ if t.name.codi.startswith('6'):
+ t.facturacio_energia = 0.0
txt = doc.createTextNode(str(t.facturacio_energia))
n.appendChild(txt)