Compdigitec Labs


ImageMagick snippet: batch crop, dither, and guillotine

Thursday, November 12th, 2020

Concatenating PDFs while padding/extending odd-length PDFs

Saturday, October 10th, 2020

When concatenating PDFs to consolidate print jobs, it is nice to have single-page or PDFs with odd numbers of pages to not have to share sides with another unrelated document. There is a short script available at ; however, it does not appear to be updated for PyPDF2. So here is an update for […]

Scanning with Brother DCP-7065DN in Ubuntu

Saturday, September 12th, 2020

First, make sure the printer is detected in lsusb: Then, either add a udev rule to ensure that we have permission to access it, or use the following one-time hack: Now, install the correct driver for the printer from For the DCP-7065DN on Ubuntu 64-bit, the following package worked: Check that sane-find-scanner can see […]

Simple recursive DNS server with Unbound DNS

Thursday, July 30th, 2020

This is a simple configuration for running a recursive DNS server (passes DNS requests to another server and caches responses) with the Unbound DNS server. Installation (Ubuntu): Open the config Configuration Replace below with the desired upstream DNS server. Starting the server Debugging / Troubleshooting Query the server Read the DNS server log References: […]

Make fails silently

Tuesday, February 28th, 2017

Run make -d &> log.txt and examine the log. Likely there is some prerequisite which is missing, in the form of “File `foo’ does not exist.”

LaTeX macros ending in numbers

Saturday, February 13th, 2016

Only letters are directly permitted in macro names, but by using csname to create definitions along with a variable command, we can simulate them. First, define the macros with numbers using \csname: Now, create a command which takes in one variable argument, and simply expands it to call the appropriate macro (“xR” + variable) defined […]

Reverse proxy with HTML rewriting using Apache

Sunday, May 25th, 2014

Importing upstream tarballs in Debian with gbp import-orig

Sunday, October 6th, 2013

To build it:

Apache Active Directory authentication

Sunday, September 15th, 2013

Add this to /etc/ldap/ldap.conf: Then add this to a block:

Reverse proxy HTTPS with Apache

Friday, August 23rd, 2013

The procedure is mostly similar to the procedure with regular HTTP, but there are a few gimmicks involved here: Generate a self-signed one or purchase a SSL certificate (*.crt) for the server in question. Make sure you run ‘sudo a2enmod ssl‘ to enable SSL. Make sure you have enable the proxy module with ‘sudo a2enmod […]

« Previous Entries