New on this site

Lowercase Filenames with Bash on Mac OS X

February 4th, 2010, filed under Apple, General and has no comment

When saving files to my harddrive I'd like the filenames to be in lowercase. It just seems more clean that way. However, I do not like renaming all files manually. So here's a little bash script that can do this automatically:

#!/bin/sh

if [ -n "$1" ]; then
  let count=0
  while [ "$1" ]; do
    f="$1"
    shift
    if [ -f "$f" ]; then
      lc=`echo $f | awk '{print(tolower($0));}'`
      if [ "$lc" != "$f" ]; then
        mv "$f" "$lc"
        ((count++))
      fi
    fi
  done
  echo "Result: $count files have been changed."
else
  echo "Usage: lowerit file(s)"
fi

An example showing the usage of the above script. See full image

Continue reading...
Still Fresh

Synchronize using Bash and Rsync on Mac OS X

November 16th, 2009, filed under General and has no comment

Recently I've configured a RAID 1 setup on my home computer which consists of two 750GB hard drives. This setup will be used to synchronize and backup files that are stored on my Apple MacBook.

I've written a Bash script that will synchronize specific directories from my MacBook to my home computer.

Continue reading...
Microwavable

Howto Backup Apple Mail using Bash and Cron

June 18th, 2009, filed under General and has no comment

Because of a recent hard-drive failure on my MacBook I had to replace my hard-drive and restore most of my data. Luckily I've been using my own automated backup script for Apple Mail which makes restoring a simple breeze.

I'm using a simple combination of bash and cron that automatically backups all my e-mail into one local .zip file. The local .zip file is automatically copied to my USB flashdrive the moment it's connected to my laptop.

Continue reading...
Stone Cold

Develop Wordpress Theme on a Live Site

May 23rd, 2009, filed under General and has no comment

Last week I came across a nice article that explains how you can develop or debug a wordpress theme on a live site. All that needs to be done is editing the file /wp-includes/theme.php and modify two functions.

URL: Wordpress Hack to Debug Themes on a Live Site

This simple hack will use the specified theme only for one remote IP...yours. Once the theme is good to go, merge the changes into the live template and comment out the code to disable the hack.

More cold posts

Batch rename filename extension on a Mac

Posted on June 2nd, 2008

I’ve graduated!

Posted on March 13th, 2008

Howto command-line unrar on Mac OS X

Posted on September 2nd, 2007

Archive

Posted on August 18th, 2007

iTunes Library Auto-Update Mac OS X

Posted on July 4th, 2007

Safely change WordPress permalink

Posted on June 7th, 2007

How not to use Powerpoint

Posted on June 6th, 2007

GlossyBlue enhanced-wp-contactform Theme!

Posted on May 20th, 2007

RSS in Plain English

Posted on May 20th, 2007

MagSafe is turning red!

Posted on May 18th, 2007