x11vnc -display :0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# pdftotext 117_Distribuidores.pdf creates 117_Distribuidores.txt | |
# pdftotext 117_Comercializadores.pdf creates 117_Comercializadores.txt | |
import csv | |
import sys | |
import re |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select id,name,value,object,meta, key from ir_values where key='action' and model='res.users' and key2='client_action_relate' and (user_id=1 or (user_id IS NULL)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from erppeek import Client | |
import sys | |
import base64 | |
from subprocess import call | |
import time | |
#report = 'giscedata.facturacio.factura' | |
#ids = [1513047, 1513049, 1513057, 1513042] | |
#ids = [1513042] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
c.id,c.state, | |
split_part(c.name,'(',2) AS contador, | |
split_part(c.ref2,',',2) AS id_contador, | |
c.description, | |
m.name | |
FROM crm_case AS c | |
LEFT JOIN giscedata_lectures_comptador m ON (m.id=split_part(c.ref2,',',2)::int) | |
WHERE state='open' AND description LIKE '%lecturas_diferentes_encontradas%'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# To clean demo data from a newly installed geoserver you have to delete some data from `GEOSERVER_DATA_DIR` | |
# Info from http://gis.stackexchange.com/questions/33049/automating-removal-of-all-demo-layers-from-geoserver | |
GEOSERVER_DATA_DIR=/var/lib/tomcat7/webapps/geoserver/data/ | |
TOMCAT_USER=tomcat7 | |
TOMCAT_GRP=tomcat7 | |
cd ${GEOSERVER_DATA_DIR} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" | |
} | |
export PS1="\u@\h \w \`parse_git_branch\`\$ " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
d_repo=( $(git remote -v | grep '\(push\)' | cut -d':' -f 2 | \ | |
cut -d' ' -f 1 | cut -d '.' -f 1) ) | |
d_base="developer" | |
d_from=gisce:$(git branch --no-color 2> /dev/null | grep '^\*' | \ | |
cut -d ' ' -f 2) | |
read -p "User:" user | |
read -sp "Password:" password | |
echo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
pids=`ps ax | grep openerp-server | grep -v grep | cut -c -6` | |
echo "Matarem uns quants erps's.... ($pids)" | |
kill -9 $pids |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" | |
} | |
export PS1="\u@\h \w \`parse_git_branch\`\$ " |