Category: Tech Corner

Chef: use knife to bootstrap nodes with chef-zero and Berkshelf

There are many reasons why you might not want to have Chef Server in your deployment path.  Or, as this example shows, you don’t want to host your own Chef Server.  We instead use Hosted Chef, but purely as a

Disable/Enable GlobalProtect on OS X

Sometimes I need to download big ISOs or other large files onto my work laptop, but GlobalProtect forces me to do so via the VPN. In order to speed things up and use my local network connection, I need to

Get nameservers from resolv.conf with Ruby

I’m a big user of Chef, but was bummed when I couldn’t find any resolver information in Ohai data. I needed to make some changes to an nginx config to use resolver, but wanted to use the resolver that’s already

Enable XHProf for WordPress


You’ll now need to have this module loaded in PHP; this varies depending on which handler you use:

cd into wp-content/plugins

In wp-config.php:

In your admin dashboard, enable “WP XHProf Profiler” from the plugins section.

Use X-Forwarded-For in Apache when behind a proxy

I love Apache. I love nginx. I love them when they’re alone, and I love them when they’re together. But when they’re together, sometimes they don’t play nice. When behind a proxy, Apache will use the proxy’s IP address in

Specify multiple redundant Vagrant box URLs

Vagrant is awesome, but there are times where you might need to specify redundant/alternative URLs in a Vagrantfile.  This could be a failover type scenario, although in my case, I needed it to give external developers access to our Vagrantbox,

Using Nginx with W3 Total Cache and Memcached

When working on a WordPress project recently where speed was a huge concern, I relied on everyone’s favorite reverse proxy, Nginx, to offload the work required by Apache to serve pages. This worked great, but an issue I encountered was

Bing Site Search in PHP with Pagination

This is a simple yet powerful way to get Bing’s Site Search API working on your site in PHP. Simply update the $config variables below and you’ll be good to go.

PHP Function to Return Lowest MX Record

This is a quick and simple one, but I admittedly started off with a for loop before coming across array_multisort. This turned out to be very useful for an application I’m working on.

Yahoo! Mail IMAP Proxy

UPDATE: It was fun, but this proxy is no longer needed. You can connect directly to Yahoo! via IMAP with the following servers: port 993 (SSL) port 465 (SSL) There are a few Yahoo! Mail IMAP proxies out there (YPOPS!,