Tuesday, 26 May 2009

Geeks: Star Wars, Star Trek, Matrix, Firefly, oh why?

I'm a geek. I love technology and the possibilities that it opens. As a geek, I love movies that have tech theme. My wife doesn't understand why I (and other geeks) love watching these movies over and over. She doesn't understand what we find so fascinating. Well, let me try to explain.

Star Wars: Knights with swords, rescuing damsels in distress, fighting evil and a force that unites all living creatures. Oh, and everything wrapped with technology.

Star Trek: Explorers searching for things that will help better humanity, meeting creatures and beings. The adventure spirit at it's best.

Matrix: People obsessed with technology also tend to be people that don't like things to stand still. We don't usually believe in fate and think that we make our own luck, etc. If we can't control it, then maybe there's an external reason.

Firefly: Cowboys, guns and the old west but with spaceships.



Dovecot migration error

We migrated IMAP servers at work and for some reason I was the only one that was affected by a small problem. I couldn't get my email! The error that would show in the maillog was:

dovecot: IMAP(user): FETCH for mailbox INBOX UID 176705 failed to read message input: Is a directory
dovecot: IMAP(user): Disconnected: BUG: Unknown internal error bytes=473/4475

After looking at several things I eventually saw that my cur directory had some subdirecties named like emails. They were empty, so I went ahead and deleted it and that fixed it!

Just thought I'd let other people know since it's one of those things that Googling didn't really give any answers. (Imagine that!)


Thursday, 7 May 2009


Wow it's been a while since I've update this!

I have several images that I got from Cisco that are in EPS format and I wanted to use them in Inkscape for diagrams, etc. They're public domain, so I wanted to see if I could give them back to the Open Clip Art Library once I was done.

I got them from the Cisco site but couldn't find anything that could easily convert them on the command line. The ways I found involved converting to PDF and importing in Inkscape. The best way was loading them in Scribus and exporting as SVG, which worked fine, but do that with 300+ files!

In the end I found that I could use pstoedit to convert to another format and then from that format to svg. This worked flawlessly and I didn't even encounter any problems on the final svg file like the website claimed there would be.

This is what I did:

for EPS in *.eps ; do FIG=`echo "$EPS" | sed -e s/eps$/fig/` ; SVG=`echo "$EPS" | sed -e s/eps$/svg/` ; echo "Converting ... $EPS" ; pstoedit "$EPS" -f fig "$FIG" ; fig2dev -L svg "$FIG" cisco_svg/"$SVG" ; rm -f "$FIG" ; done
It worked like a charm.


(Note: I've fixed the script. Thanks to Nelnik pointing out in the comments that my sed for /eps/fig/ would convert steps.eps into stfig.eps. This is due to me not being specific enough. Adding the $ at the end of the /eps/ makes it look specifically for something ending in eps. This would match the extension only in steps.eps.)