Have you ever wondered how the OK and/or FAILED messages are printed out in the initialization of services on a Linux system during bootup? Well… I have. Anyway, I’ve always thought that it was really cool how the OK and FAILED messages printed out at the same column on the screen and in different colors. So of course I wanted to know how to do that so I could use it in my own scripts.
Tutorials
How To Create A Bash Install Script
Have you ever wanted to create an installer program on a Linux system, but didn’t want all the hassle of an actual install builder? I have. I recently had need of a simple, no frills installation that could: ask the user a few questions extract some binary files and do some stuff with those binary …
How To Use Subversion Over SSH
The Problem I recently had a problem. I am a software developer and as such I use source control. For this purpose I generally prefer Subversion. I have been keeping my source repositories on an external drive with the intention to back them up to another secure location periodically (yeah, that never happens). I looked …
PHP Script To Monitor FTP Directory Changes
I recently had the need to be able to monitor a directory on an FTP server for changes and to then be notified of those changes. I’ve been working a lot in PHP lately so I decided to use that to implement my script. FTP Access FTP (file transfer protocol) access in PHP is a …
Bash Script Naming – Say My Name, Say My Name!
I use Java as my main Linux server programming language these days and so I usually have a Bash script to go along with each program. The Bash script help encapsulate creating the proper CLASSPATH needed to run the Java program, calls the correct Java class and also passes through any command line parameters that …
How Do I Get Meta Data From MySQL Using PHP?
I know you’ve all asked that question before, right? Well maybe not, but I recently had the need to detect what the DATATYPE for arbitrary columns in arbitrary tables were inside a MySQL database using PHP. Turns out that it isn’t all that hard to get. The main thing about using this method is that …
Inserting A Picture Into Your WordPress RSS 2.0 Feed
I use NetVibes for my browser home page and RSS feed reader and I’ve noticed over time that some of the feeds that I subscribe to have pictures embedded within their feed summary. Why doesn’t my feed have a picture in it? I thought that this was really neat because it gives you a quick …
Calling A Stored Procedure In Java With A Blob Field
Here is the situation. You are writing a program in Java. You need to access data in a Microsoft SQL Server via stored procedure and the data has an XML field. A what field? SQL Server 2005 introduces a new datatype for XML. It is essentially a blob field that you can perform XML operations …
Looping Through Pages In WordPress
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 …
Writing A WordPress Filter To Modify Post/Page Titles
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 …