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
Vote for The Women’s Center!
The Women's Center is a non-profit organization that cares for women and children who are victims of domestic violence. Please take 5 minutes to vote for The Women's Center to help them win a $250,000 prize from the Pepsi Refresh Project. This money will allow them to provide their shelter with the repairs and upgrades that it desperately needs.
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.
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
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.