Skip to content

Instantly share code, notes, and snippets.

@longbowking
longbowking / glibc-check.sh
Last active April 22, 2020 16:17 — forked from fasterthanlime/glibc-check.sh
Prints the various glibc versions required by an executable
#!/bin/bash
# This scripts lets you check which minimum GLIBC version an executable requires.
# Simply run './glibc-check.sh path/to/your/binary'
#
# You can set `MAX_VER` however low you want, although I (fasterthanlime)
# Ubuntu 12.04 has GLIBC 2.15
# Centos 6.9 has GLIBC 2.12
# Centos 7.4 has GLIBC 2.17
@longbowking
longbowking / convert-docx-to-html.py
Last active January 9, 2025 08:37 — forked from phillipkent/convert-docx-to-html.py
Convert a DOCX file to HTML (using python-docx)
# Converts a docx file with tables and images to (simple) HTML
# ORIGINAL CODE BY DAVID SSALI AT SOURCE: https://medium.com/@dvdssali/docx-to-html-1374eb6491a1
#
# Requires the Python module 'python-docx' <https://python-docx.readthedocs.io>
#
# Example use:
# >>> s = convert('./SOURCEDIR', 'SAMPLE.docx')
# >>> print(s)
# or
# $ python .\convert-docx-to-html.py > temp.html
@longbowking
longbowking / convert-docx.py
Last active April 30, 2019 02:49 — forked from phillipkent/convert-docx.py
Convert a DOCX file to another DOCX file (using python-docx)
# Converts a docx file with tables and images to a new docx file
# The new file is based on a 'stub' document which contains preamble text and styles
#
# Requires the Python module 'python-docx' <https://python-docx.readthedocs.io>
# Written for Python 3
#
# Source documents are taken from the directory 'source' and converted documents are saved
# to the directory 'converted'
#
# Two types of source documents are handled: 'Fiscal Guide' or 'Economics Regime'. Each one