Steve Grunwell

Open-source contributor, speaker, and electronics tinkerer

Category: Code

Announcing Revision Strike

I’m proud to announce my latest WordPress plugin: Revision Strike.

Unless post revisions are explicitly limited, WordPress will build up a hefty sum of revisions over time. While it’s great to have revision history for some recent content, the chances that old revisions will be necessary diminish the longer a post has been published. Revision Strike is designed to automatically remove these unneeded revisions on older, published posts.

Continue reading→

Sunsetting WP Password Generator

My WP Password Generator plugin was my first foray into WordPress plugin development. It started back in 2010, just over a month after I started at Fahlgren Mortine, when my friend Greg Laycock and I were working on a client’s WordPress site and decided that manually generating passwords was a total pain. I suggested “what if we have a ‘Generate Password’ button on the user edit screen?”, he agreed, and I spent that night writing a quick plugin that makes an Ajax call to a script that generated a password. After we submitted it to the WordPress.org repository, we watched the download counts climb (I remember how thrilled we were once we crossed 100, and it just continued to rise from there).

As time went on, feature requests rolled in through the plugin forums and GitHub, but we intentionally kept the features simple (it’s a password generator, not a whole user management suite, after all). It was eventually rewritten to better adhere to the WordPress coding standards and use the native WordPress wp_generate_password() function instead of my home-rolled solution (which was actually pretty similar). It was never the flashiest plugin, but it was a perfect learning experience for both WordPress plugin development and managing an open-source project.

Continue reading→

Quick Tip: Google Publisher Console

My Engineering Manager, Ivan Lopez, turned me on to the Google Publisher Console last week, which gives you a nice way to debug Google DFP ad placements.

It’s simple to use, simply ad ?google_force_console to a URL that’s using DFP and Google will automatically load a nice inspector to see what data is being used to generate the ads on a site.

Continue reading→

Quick-tip: git add –patch

If you’ve ever found yourself in a situation where you’re working on multiple code changes at once and want to split them across multiple Git commits (or simply not commit parts of it), git add -p will let you interactively specify separate parts of the file to be committed.

Continue reading→

SQL-generated Hyperlinks in your Spreadsheets

I was building a QA spreadsheet the other day, where I needed to generate a number of randomly-generated WordPress posts with the posts’ titles, URLs, admin URLs, and publication date to be shared with the client via Google Drive, and needed my SQL query to generate links that could readily be pasted into the spreadsheet.

Continue reading→

Resolving PHPUnit issues on VIP Quickstart

I ran into this issue on my VIP Quickstart Vagrant box today while attempting to run PHPUnit:

Warning: require_once(PHP/CodeCoverage/Filter.php): failed to open stream: No such file or directory in /usr/bin/phpunit on line 38

Continue reading→

Bypassing JavaScript Anti-Clipboard Measures

As I write this, my new Epiphone Casino is sitting in my lap and I’m looking up George Harrison guitar tabs. Unfortunately, when you’re best known as one of the Fab Four, lawyers love to block access to your work that doesn’t bring in royalty checks for your estate. When looking for one song in particular, What is Life, my go-to tab site, Ultimate-Guitar.com, came up short.

Continue reading→

Making Apps Personal with Gravatar

If you haven’t already implemented it in one of your own apps, you’ve almost certainly used a site that uses Gravatar, an Automattic-maintained project that provides the web with Globally-recognized avatars. WordPress sites naturally use them for author and commenter avatars, but Gravatars are also used by major sites like Stack Overflow, GitHub, and more.

For maximum portability, Gravatars are always square and can be automatically resized to fit most applications. Defaults can be specified, including several types of uniquely-generated avatars including identicons, wavatars, and the 8-bit inspired “retro” avatars. Let’s take a look at how easy it can be to implement Gravatar in your next project, shall we?

Continue reading→

Quick Tip: JavaScript Resize Timer

I wanted to share a little trick that I use a lot when building responsive sites that can be a huge help for your front-end performance, which I call the “resize timer”:

Imagine the following scenario: you have a series of horizontally-aligned boxes on your page, which should be equal height. Of course, this is easy to pull off with Flexbox, but browser support isn’t exactly where we want it just yet. Use it where you can, of course, but you might still need a JavaScript-based fallback for older browsers.

Continue reading→

HubSpot Signals and Your Privacy

This week a few people in the office got really excited about the Signals app from HubSpot, which lets you see when your emails have been opened and whether or not links have been clicked in your emails. While it’s extremely useful for marketers, project managers, and others who have a vested interest in knowing you’ve read their emails, I’d prefer to be able to read the email at my leisure without having the sender essentially standing over my shoulder to see if I’ve read it. For most people it’s not a big concern, but it is incredibly simple to thwart if you’d like a little more privacy in your inbox.

Continue reading→

Page 5 of 7

Be excellent to each other.