Algorithm: Optimized PDF Web Page Print Layout

I’d like to share my efforts to prevent page breaks in the middle of paragraphs and maximize the use of page space when printing web pages to PDF. I’ll outline how this PHP+NodeJS+Chrome tool and algorithm accomplish this. The motivation is to prevent pictures from being cut off, cut halfway through, or from being pushed […]

GoAccess Web Log Analyzer Installation on CentOS

GoAccess web log analyzer is a beautiful tool to show real-time traffic and stats – including GeoIP information, bandwidth usage, and visitor time distributions – of my web projects and apps over and above Google’s Webmaster Tools and UA reporting. At a glance I can see current traffic and historic traffic just by adding a […]

Download YouTube 4K Videos with PHP and SlimerJS

Among friends let’s agree we’ll be privately caching videos and not permanently saving them, or we’ll be using them for Fair Use, and we’ll certainly not upload nor share these videos outside of the originating platform (e.g. YouTube.com). Existing YouTube downloader scripts: YouTube-Downloader (does not work with videos using a cipher signature) YouTube video downloader […]

Running Xvfb on a RHEL Shared Host (without X)

This is how I compiled the Xorg Server for RHEL on a CentOS machine with modifications to create a portable Xvfb binary. Xvfb (X virtual framebuffer) is an in-memory display server for Linux and Unix-like OSes. It enables running graphical applications without a display such as running a headless browser (e.g. A full-blown Firefox instance […]

Bungee Jumping in Japan

That was really a really high bridge – 70m – and the river was shallow beneath us. There was no one else there. The team of jump masters was ready for just us two. It was amazing, like we had the whole valley to ourselves, Alex and I. We wanted an adventure, something we’d never […]

PhpStorm Productivity Shortcuts

I use PHPStorm daily and it’s nice to remember the shortcuts. Sitepoint has a great run down of productivity shortcuts. I’m reproducing my favorite ones here. This comes straight from Sitepoint. PhpStorm remembers multiple clipboard contents – you can press CTRL+SHIFT+V to summon a popup which lets you paste clipboard content that’s less recent than […]

Hello world!

Welcome! I usually keep my writing in my source code comments, or in Evernote, or on Stackoverflow.com, but it makes sense to keep my most useful snippets and research in one central place. This site is more for my own reference, but enjoy if something here helps you.