Skip to content

Instantly share code, notes, and snippets.

Avatar

Mathieu Geli gelim

View GitHub Profile
@gelim
gelim / jar_serial_patch.py
Created Nov 11, 2017
JAR serialVersionUID patched
View jar_serial_patch.py
#!/usr/bin/env python [54/1801]
#
# serialVersionUID Java class modifier
# -- gelim @ ERPScan
#
from pprint import pprint
import argparse
import zipfile
import struct
@gelim
gelim / sharelatex-install-ubuntu-16.04.md
Last active Aug 10, 2022
sharelatex (non-docker) installation on a ubuntu 16.04 server
View sharelatex-install-ubuntu-16.04.md

Installing ShareLaTex on Ubuntu 16.04

Use this as-is without any warranty, and don't bug ShareLatex project members if there are problems with my instructions. They officialy support docker installation only.

This gist summarize the actions I did to setup a pure ShareLaTex community edition on a bare linux ubuntu 16.04 server (no docker). I intentionnaly tried to stick to distribution practice for running daemons (via runit, and not via a custom my_init + setuser wrapper).

I basically took ShareLaTeX receipt to build their docker and adapted it.

@gelim
gelim / test-nginx-date-parsing
Last active May 26, 2016
logstash date filter (nginx)
View test-nginx-date-parsing
$ logstash -f test.conf
$ echo '{"ts": "03/Sep/2014:16:11:58 +0200", "foo": "bar"}' | nc localhost 2222
@gelim
gelim / lxml-tests.py
Created Oct 21, 2010
lxml.etree & StringIO strangeness
View lxml-tests.py
import StringIO, lxml.etree
xmldata="<root>data</root>"
buffer=StringIO.StringIO(xmldata)
for event, element in lxml.etree.iterparse(buffer):
print "%s %s %s" % (event, element.tag, element.text)
buffer.close()
buffer=StringIO.StringIO()
buffer.write(xmldata)
@gelim
gelim / lxml-tests.py
Created Oct 21, 2010
lxml.etree and StrinIO strangeness
View lxml-tests.py
import StringIO, lxml.etree
xmldata="<root>data</root>"
buffer=StringIO.StringIO(xmldata)
for event, element in lxml.etree.iterparse(buffer):
print "%s %s %s" % (event, element.tag, element.text)
buffer=StringIO.StringIO()
buffer.write(xmldata)
for event, element in lxml.etree.iterparse(buffer):