little bits of shell scripting

I got rid of the wiki, so I’ll just be blogging this kind of stuff. This is OSX specific, but I’m sure alternatives exist on linux and probably even windows. I wanted to take a screenshot every couple of seconds in the background and save the files with some kind of unique filename. First, create an empty directory for all the files, then run this one-liner from a bash shell.
while true; do screencapture -x -s $(date +%H%M%S); sleep 10; done
The -x parameter turns off the sound normally output on each screen capture. Ok, this will give you a screenshot with the timestamp as the filename in pdf format. To convert from pdf to png:
for i in ./*; do sips -s format png $i --out $i ; done
This will convert all the files in the directory to png format. There are probably more elegant ways of accomplishing this whole thing, but it worked for me when I need it to.

happy belated bday to myself

27 was a good one

Started the day out here

longroad

Didn’t like that so much, so kept driving west and eventually got here

drivingmountains

That was pretty cool, so we decided to go a little higher

ruidososlopes

And the finish, exhausted but loving every minute of it

self-skiing

two questions regarding the iPhone

1. Can I write software for it?
2. Can I put it in my back pocket and sit on it?

If the answer is yes, then I’m sold.

Update: Well, that didn’t take long, according to Michael Gartenberg the iPhone will be a closed platform. That’s pretty disappointing. I might even settle for just being able to run my own widgets. Not sure if this is a deal breaker or not, there’s a lot of time between now and June.