This is a presentation I made at the New York Times to the WordPress Big Media and Enterprise meetup in New York.
Category Archives: Work
Testing HTTP redirects with Curl
We’ve got a really complex redirection setup for the current project at work, a mix of some general rules (http://blog.example.com/ to http://www.example.com/blog/), some oddball domain redirects (http://blog.example.jp/ to http://www.example.co.jp/blog/), and some more esoteric ones thrown in there for luck. I started off briefing my colleague with a description of what I needed, but this very …
Redirection recipes
Some 3,000 Apache redirection rules are getting scrapped by a client (not a bad thing), and I wanted to make sure I had a note before that happened. All 3,000 rules are all variations on the following few types of redirection rule.
Human readable Gravity Forms exports using XSL
We have a client who needs to review a very complex form created in Gravity Forms. The form has many fields, and to make things worse the labels displayed to the user and the labels displayed to the administrator when someone submits the form are different. Because Gravity Forms has an XML export, it occurred …
Continue reading “Human readable Gravity Forms exports using XSL”
Alfred Workflow to open a directory in Sublime Text
I’ve recently switched to development in two Vagrant virtual machines (VMs), one VM running Nginx and one running Apache. This means that are two locations I might need to open files from, with two sets of directories representing the document roots of my various development sites. Eventually I got bored of using the terminal to …
Continue reading “Alfred Workflow to open a directory in Sublime Text”
Taxonomies talk at WordCamp Lancaster 2013
I’ve posted my slides for my Taxonomies talk at WordCamp Lancaster 2013 over on the company blog.
Using the OSX clipboard from the command line
The OSX pbcopy terminal command, which adds “stuff” to the clipboard to be pasted later, is really useful. For example, to download some webpage and put the HTML source in the clipboard: Here’s a WordPress example; want to get some fresh API salts and keys for a wp-config.php? Try this: Want to be notified when …
Continue reading “Using the OSX clipboard from the command line”
Spot the duplicates, using a Gravatar identicon hack
A project at work needed me to write a UI to find and delete duplicate attachments on a single post, from a client’s WordPress website. Creating a couple of queries where I could look over each post in turn, and check a hash for each file attached, then spot the duplicate hashes wasn’t too hard. …
Continue reading “Spot the duplicates, using a Gravatar identicon hack”
Apple Mail sending email from the wrong account
I’m currently running Apple Mail with the unified inbox option, so I can connect to my old company email address as well as my Code for the People address and see everything in one place. There’s settings in Mail to allow you to set the default sending address, and when you reply to a mail …
Continue reading “Apple Mail sending email from the wrong account”
Protecting staging sites with Basic Authentication
This approach was primarily devised for use with WP Engine staging sites, but will work in any situation where you have no access to Apache’s config and need to use a single .htaccess file for multiple domains (e.g. a multisite setup). We’ve recently had a couple of projects hosted on WPEngine where we need to …
Continue reading “Protecting staging sites with Basic Authentication”