Skip to content

Instantly share code, notes, and snippets.

View jcoffland's full-sized avatar

Joseph Coffland jcoffland

View GitHub Profile
@jcoffland
jcoffland / httpproxy.py
Last active May 29, 2025 12:21
This script implements a very basic HTTP/HTTPS proxy.
#!/usr/bin/env python3
#
# This script implements a very basic HTTP/HTTPS 1.1 proxy.
#
# Author: Joseph Coffland
# Copyright: 2025, Cauldron Development Oy
# License: GPL 3+
import socket, _thread, select, argparse
@jcoffland
jcoffland / reduce-scanned-pdf.sh
Last active February 28, 2025 17:50
Reduce size and improve contrast of PDF containing scanned document images
convert -compress jpeg -quality 70 -density 300 -colorspace gray -normalize -define pdf:fit-page=a4 input.pdf output.pdf