First days with Chumby!

I got my Chumby last Thursday and boy has it been fun. It comes in this very cute canvas sack, making it very transportable. I’ve really been enjoying the Flickr photo stream widget, the twitter widget, the Rotten Tomatoes widget, and the YouTube widget. I got the one with the black leather outside, but I really love this craft. Overall it’s soooooo fun!

Pictures:

Chumby Sack Chumby Packaging Chumby Control Panel Chumby Rotten Tomatoes Widget

Posted
 

Ruby script to convert file(s) character encoding

Today at work I had to take a whole set of directory upon directory of files and convert them from one character encoding to UTF-8. Of course, this was instantly a task I said a script should do. And along came the following script. It takes two options one required, defining the character encoding of the files being converted, using the flag “-f”. The other optional, defining the character encoding the files are to be converted to, using the flag “-t”. The second is optional because the default is to convert to is UTF-8. Finally, it accepts an argument list of directories or file names and processes each recurcively going through each directory processing each file and/or directory in it. It ignores all invisible files (those that start with “.”). It will most likely fail for a given file if the character encoding is off. But it will continue with the other files notifing the user that there was an issue.

Posted