Category : Tutorials


7Apr2008

In a recent article I outlined how to modify the output of the wp_list_pages() template function in WordPress. Later on, however, I found that having the <span> tags that I added in every single title was not desirable. So instead of using a filter I wrote a small bit of custom code to iterate through [...]




3Apr2008

I was recently working on a new WordPress theme when I had need to modify the title of pages before output. The style I was attempting to use involved wrapping <span> tags around the title (inside of the href tags). The wp_list_pages() function returns pages (which are basically the same as posts) and has several [...]




1Apr2008

Many people use the MySQL open source relational database server. Mostly for websites, but I’ve also seen it used elsewhere. One problem that I recently ran into with my local development installation is… “what was my root password again?” Aaaggghh!
OK, sorry. Don’t panic; it can be recovered. A quick survey of the internet and I [...]




24Mar2008

To tag heaven. Ah, yes… tags. The teacher’s pet of Web 2.0. The category list on this blog had become rather unwieldy as I just plugged in new categories whenever I did not feel like putting any thought into organization. I never really liked that method and so when WordPress implemented tags I figured I’d [...]




20Mar2008

Many blogs in the wild these days have Featured Posts listed somewhere on their site, usually along the top of the blog or in one of the sidebars. This is a great way for bloggers to showcase some of their best work, some of their most popular posts or posts that have been rated by [...]




18Mar2008

In my first posting on this topic I outlined a manual method by which you could code Bash scripts to check to see whether or not an instance of the script was already running. This is very useful in scripts that might cause adverse affects if more than one instance runs at the same time. [...]




12Mar2008

I just wanted to post a few quick tips on using the Vim (vi iMproved) text editor. Whenever you are editing a large text file in vi you may want to know where you are? What line am I on? Well, it’s actually quite easy. Just type CTRL-g and look at the bottom/status line of [...]




4Mar2008

In the original posting, Conditional Statements And Comparison Order, I brought up a coding style used by some software engineers that struck me as odd. The practice of placing a constant value first in a conditional comparison. For example:

if("Some String" == aVariable) {
// Do some stuff
}

Listing 1
I never liked the way this reads [...]




19Nov2007

Have you ever wanted to be able to process an arbitrary number of command-line arguments in your Bash scripts? Well, fear not! It is actually quite easy. All you need is one of the special built-in variables of the Bash shell. The “$@” variable gives you the parameters passed on without any expansion and seen [...]




30Oct2007

I thought I’d share another one of my personal scripts. This one is a script that I use to backup this website including files and the MySQL database. It is very simple and straightforward so I won’t bother with long explanations. If you have any questions about it please feel free to comment. On tip [...]