Blog

I share bite-sized insights, tips, and tutorials on DevOps, Software Engineering, Web Development, Linux, and more, out of my continuous learning journey

I hope that you find something that helps you on your own journey


  • A WordPress ajax handler for custom themes

    Something I have been noodling on is a better way to handle ajax requests in my custom themes. Seems to me that a relatively complex theme ends up with a lot of add_action calls for custom ajax handlers, and this could be simplified/reduced. Every time a new endpoint is required we have to add two new add_action calls to our theme. Maybe a better approach is to write a single ajax endpoint that will route requests to the proper classes/methods?

  • My VagrantFile

    This is the Vagrantfile I am using for my development box at home and work. It is determines how much ram is available and how I want to allocate, how many CPUs are available, and configures the VM for me. I use NFS for shared folders. Finally, starting to use "hostupdater" to keep my host machines hosts file current.

  • Ohai Plugin for OpenVZ VMs to get public IP Address

    Media Temple uses the OpenVZ virtualization system and I have quite a few Media Temple servers under Chef management. The one thing that has made management difficult is that by default during a Chef run ohai returns 127.0.0.1 as the default IP address which means I cannot run knife to execute commands from my workstation.

  • What to do when your website is hacked/exploited

    So your website has been "hacked"? You load your website in your browser, and are redirected to some spammers website, or maybe you google'd yourself (naughty), and found a few thousand indexed pages for knock off prada gear? Ok, so how do you fix this, and more importantly, how do you learn how they did it so you can defend against it later.

  • Virtualbox Bug related to SendFile

    I have been doing more web development with Vagrant and VirtualBox. It's a nice way to keep my dev environment nearly the same as my production environments. Recently I was doing some front-end coding and was running into the most bizarre errors with my JavaScript.

  • Setup Development Environment with Vagrant & Chef

    I use Chef to manage and provision new staging and production servers in our company. It takes a lot of the headache out of managing multiple servers and allows me to fire up new web & data servers for our projects with ease. I have several cookbooks that I use to configure servers and to setup/configure websites. In a nutshell, it's rad, and website deployments have never been easier.

  • Trying to Troubleshoot extremely high MySQL CPU Usage

    MySQL CPU usage was spiking upwards of 1000%. Load average was around 50-60. I could not SSH into the machine though, not immediately.

  • Securing Git repository from accidental exposure using Chef

    It was brought to my attention at the office that a few of our recently launched websites had publicly exposed .git repository information. Unscrupulous users could use the exposed data to pull down the entire commit history, giving them unfiltered access to what is basically the blueprint for the website.

1 3
Next ›