Building a Static Site Generator

Categories: programming

It's been a while since I posted... well, really anything on my site. I don't know that I could give a single reason (I have considered the possibility I might be lazy, but discarded that idea); the problem is the sum of a number of reasons, some of which I'll lay at the feet of WordPress.

PHP PDF Libraries

Categories: programming

PDFs are easy! Like riding a...oh.

PDFs are easy! Like riding a...oh.

I wanted to do something I figured would be relatively simple. After all, we're doing it in .Net with a third-party library: Create a PDF with text from a database with vector graphics incorporated in the page. Turns out, it's pretty easy if you want a paid solution; numerous libraries exist for PHP that are non-free. If you insist on going free-only though, be warned: here be dragons (maybe).

Host-Based Ad Blocking

Categories: programming

To block ads on the web, we need to catch requests to a particular ad server and send them to our local server. We do this by adding an entry to the hosts file. The hosts file on a computer system gives the system information about where to find a computer on the network by mapping hostnames to IP addresses. For our purposes, we will be taking advantage of this by routing requests to ad servers from webpages to our personal system.

These steps will require that you have Apache HTTP server (or IIS with ISAPI_rewrite, something that can rewrite URLs) running on your local machine (or on a system with low latency, possibly on your network).