Posted in code
02/2 2010

Kodak W820 Media RSS Feed

I recently bought my dear mother a Kodak W820 digital photo frame. It’s wireless and supports several ways of reading media from the web, one being RSS. I don’t have much experience with RSS so when I wanted to create my own RSS feed for the frame, I had a little trouble. Here is the markup for the feed that ended up working for me:

Posted in code
02/1 2010

Anatomy of an AIR Build Script (Windows)

Building AIR applications isn’t particularly difficult, but I thought someone may benefit from seeing the super simple python script I use to build the AIR app I am currently working on.

It allows you to do three things: run your app in the debugger, create a new self signed certificate, and build the final .air application file.  It assumes the following directory structure (but you can easily edit the script to customize this):

root/
	index.html
	application-descriptor.xml
	/js
	/css
	/locale
	/icons

When finished building it places your .air file into a subdirectory called “build”.

Posted in code
01/28 2010

seltzer, A Simple Javascript Interface for SQLite in Adobe AIR

I’ve recently started my first project using Adobe AIR.  When it came out a few years ago I did what most people did and said, “Oh, cool”, and then immediately forgot about it.  But after reviewing several ways of solving this latest project, we realized that AIR was perfect.

AIR lets you choose what you develop with: Flex, Flash or Javascript+HTML+CSS.  I chose Javascript because lately I’ve seen how powerful of a language it can be.  Also I don’t know Flash or Flex :)

The AIR javascript API has support for SQLite databases which is totally awesome.  My project has a fairly simple database and I wanted an easy way to interact with it.  Thus, I created seltzer.  I don’t really know why I called it that, I guess AIR reminds me of airy things.  Like alka-seltzer?

You can download/fork/ignore completely the project on github.  I’ve written some unit tests with QUnit but it still needs a lot of work.  Hopefully by the end of my current project it will be breathing fire and lazer-blasting planets.  In a good way.

Here is an example of how the API works.  Like I said, it’s dead simple.

And here is a screenshot of the QUnit badassery:

Posted in code
06/21 2009

Unzipping .svgz files in PHP

I recently needed to take user uploaded .svgz files, decompress them (a .svgz file is simply a gzipped .svg file) and read some of the meta data.  The operation is fairly straight forward in PHP but I couldn’t really find a comprehensive example online.  So here is the solution I came up with and it seems to be working quite well: