Guy Paddock's blog

Creating Theme-specific Styles for Advanced Forum

Guy Paddock shares a short tip for people who want to create custom, per-theme styles for the Advanced Forum module.

Java-inspired Enumerated Types in PHP

Have you ever been developing an application in PHP and wished that the language supported "enums" or "enumerated types"? In this blog post, Guy describes several solutions to this problem.

Converting Absolute Paths to Relative Paths in PHP

In PHP code, have you ever needed to convert an absolute path to a path that's relative to another path?

This article provides the source code for a useful utility function to do just that.

Mirroring Files in Different Places - Links, Bind Mounts, and BindFS

Here at RedBottle, we recently had to solve a problem: how do you make the same files appear in two different places in Linux?

Read about the different solutions we found.

Quick Tip: CentOS/Red Hat, sdiff, and .rpmnew files

This is a quick tip for CentOS and Red Hat sysadmins out there, in the hopes that it saves you some time!

After upgrading software recently on one of our CentOS servers, we ended up with a lot of ".rpmnew" files strewn about in /etc because of all the configuration updates. Curiously, a search through Google yields results of people suggesting the following options for dealing with them:

Generating PCRE Regular Expressions from Date Format Strings in PHP

Have you ever found yourself wishing that it was as easy to write a regular expression to match a time/date string as it is to generate a time/date string with the PHP date() function?

Do you find yourself in need of a quick and easy way to "tokenize" time/date strings like "September 7th, 2010" into values like "9", "7", and "2010"?

Subscribe to RSS - Guy Paddock's blog