dacaprice.com from fitness to technology. mostly technology. sometimes fitness.

22Mar/110

Match patterns using perl on the command line

Since I can never remember this: The following one-liner will print every line in file.txt that matches your pattern "match".

perl -l -n -e 'print $1 if /(.*match.*)/' file.txt

Tagged as: No Comments
22Jun/100

iPhone OS 4.0

Since it was made available last night, I updated my iPhone to the newest OS 4.0.  It seems to work really well so far, but Apple didn't update any of the documentation links in Safari, so I had to read about how to use the new features elsewhere.  Here is a good guide from Gizmodo that goes through the ins and outs of the newest update.

UPDATE:  The Ars Technica review is actually more thorough.

Tagged as: No Comments
22Feb/100

Change uppercase filenames to lowercase

I needed to rename a handful of image files from my iPhone from all uppercase letters to lowercase.  I did this in a bash shell in Fedora linux. Here's how I did it:

[dacaprice@fedora10]$ for i in `ls *JPG`
do
mv $i `echo $i |  tr '[:upper:]' '[:lower:]'`
done

Tagged as: , No Comments
17Feb/101

Hacking Aerogarden seed pods

A few years ago I received an Aerogarden by Aerogrow as a Christmas gift.  I love to cook so growing my own fresh herbs seemed like a great idea.  My only real complaint was the cost of the replacement seed pods.  So naturally I began to look for a way to make my own seed pods.  I was inspired by a blog post I saw on Jung's Weblog.  Jung is really into aeroponics and growing and cooking with her own veggies.  Here is what I did:

I had to order a new pump which arrived today.  I'll update in a few weeks if I get some growth.

Tagged as: 1 Comment
14Feb/100

iPhone Update 3.1.3 Problem

I've recently updated to the latest iPhone 3.13 software that claimed to have fixed some battery issues brought on by the previous 3.1.2 version.  While I didn't think I was having any battery problems, I gave it a shot.  BIG MISTAKE.  I would advise anyone who is NOT having any problems with the 3.1.2 version software to stay right where there are.  Even with little or no use in a day, I find my battery drained more than half way.  With the previous software I could sometime go a day without recharging.  I hope Apple fixes this soon.  It seems I am not the only one with the complaint either.

iPhone Users Report 3.1.3 Update Problems

Tagged as: No Comments