Listing Unique Font Stacks on a Webpage

I just put together a new tool to list all the unique font stacks on a web page, intended to help with diagnose and remove unnecessary webfonts and save page load time.


Download this file and include in your page source, or copy-and-paste it into your browser’s JS console, then run the styleInPage() function with the CSS style you want to inspect as the parameter.


// Show all unique font stacks in use on the current page console.log(styleInPage('fontFamily')); // Show a list of all DOM elements with their computed font stack console.log(styleInPage('fontFamily', true)); // Highlight all DOM elements using font stack 8 var fontStacksInUse = styleInPage('fontFamily'); console.log(fontStacksInUse); highlightInPage(8);

php iconA quick-and-dirty PHP script to unserialize a string in PHP.

Clone (or download and expand the zip file) into your documents root and point to the folder.

Enter your serialized data into the `textarea`, submit, and boom!—your serialized data is expanded to a much more human-readable view! screenshot

Created for use with this Alfred custom search (note that if your serialized string is longer than 4,000 characters, it may cause a 414 “Request Too Long” error).

Woo Generate New Password Reset Link

If your site auto-generates customer credentials, then they receive their username and password in plaintext in their email.

To improve security and make the experience a bit more user-friendly, this plugin sends users a link to create their password, much like WordPress core does when you add a new user account.

Get the code at the WordPress plugin repository, or open issues at the GitHub repository. Continue reading

Alfred MX Toolbox SuperTool Custom Search

If you use Alfred on your Mac and use with any regularity, this custom search should save you time.

Add the custom search

Alfred MX Toolbox SuperTool screenshot

Use the keyword “mx” and any of the SuperTool commands listed here to search for the info you need.

Here is another custom search specifically for whois data.

Add the custom whois search

Alfred MX Toolbox Whois information

Here’s an icon you can use, since custom search URLs don’t include images:MXToolbox

Days 12–14: Setting up a Public Instance

The rest of this series can be found here.

Setting up a Public Instance

Today, I’m working on setting up a public instance of this app, since must apps aren’t built just to run on the dev’s local computer. I initially tried running on the server I host several other sites on, but it’s a shared host running Ruby 1.8.7 and Rails 2.3.18, so it’s significantly behind current, and I’m unable to update it.

I could easily run on AWS, Google Cloud, etc., but since this is mainly a self-educational project, I don’t want to pour money into keeping a server running just to host it. Continue reading