Cambridge, MIT, and WordCamp Boston 2013

I had the pleasure of attending WordCamp Boston 2013 last weekend where I got my third WordCamp T-Shirt for 2013. The camp was held at the Microsoft New England Research & Development (NERD) Center. I also had the pleasure of checking out the MIT campus while I was in Cambridge which was a total treat.Continue reading “Cambridge, MIT, and WordCamp Boston 2013”

A little PHP script to watch for 404 errors

This is a quick script which reads a standard RSS feed and then grabs the response header for each feed item and makes a log file of 404 errors. Useful in debugging sticky situations. [code language=”php”] <?php $link_queue = array(); $exception_queue = array(); $timestamp = date( ‘Y-m-d H:i:s’ ); $rss = simplexml_load_file( $argv[1] ); foreachContinue reading “A little PHP script to watch for 404 errors”

Some Helpful Varnish Commands

Look at incoming requests for URL varnishlog -c -m RxURL:”/somepage.html” Look at requests made to the backend for URL varnishlog -b -m TxURL:”/somepage.html” Requests for one specific host varnishlog -c -m RxHeader:”Host:” See cache age for a specific host varnishlog -c -m RxHeader:”Host:” | grep Age Test VCL compilation varnishd -C -f /path/to/file.vclContinue reading “Some Helpful Varnish Commands”

Assign Random Featured Images To All Posts

Could be used for setting up dummy content for a staging environment, or something similar. Be my guest and let me know how you decide to use it in the comments! Also, check my github for this function built into a WP-CLI command. [code language=”php”] $posts = new WP_Query( array( ‘posts_per_page’ => -1, ‘post_type’ =>Continue reading “Assign Random Featured Images To All Posts”