New on this site
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
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
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
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.