Skip to content

Instantly share code, notes, and snippets.

View nehemiascr's full-sized avatar
🚀

Nehemias Herrera nehemiascr

🚀
View GitHub Profile
{
"swagger": "2.0",
"info": {
"version": "4.2",
"title": "traccar"
},
"host": "traccar.fakturacion.com",
"basePath": "/api",
"schemes": [
"http"
import base64
from lxml import etree
from OpenSSL import crypto
import xmlsig
import datetime
import pytz
import hashlib
import urllib
def sign_file(cert, password, request):
<ds:Signature Id="Signature87773">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="#Signature87773-SignedProperties14164" Type="http://uri.etsi.org/01903#SignedProperties">
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>yd7SUTdnnhgJo/5CtcEO87TjnO4=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#KeyInfo47295">
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
@nehemiascr
nehemiascr / odoo on docker
Created March 6, 2018 12:26
Some docker commands for odoo
:::::::::::::::::::::::::::
:::::::::::::::: SSH tunnel
sudo launchctl stop com.edb.launchd.postgresql-9.3
ssh -N -L 5432:127.0.0.1:5432 -i /path/to/key.pem user@domain.com
ssh -i /path/to/key.pe user@domain.com
:::::::::::::::::::::::::::
::::::::::::: base de datos
@nehemiascr
nehemiascr / wkhtmltopdf.sh
Created February 17, 2018 08:13 — forked from Rajeshr34/wkhtmltopdf.sh
Wkhtmltopdf With Patched QT Setup Ubuntu 16+
cd ~
wget https://downloads.wkhtmltopdf.org/0.12/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
tar xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
mv wkhtmltox/bin/wkhtmlto* /usr/bin
apt-get install -y openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig