My wife is a great cook and has been cultivating a recipe collection since before we were married. Last year (2013) she made a very limited run(4 books) of hand-made recipe books for as Christmas present for a couple of friends.

For her birthday this year I made her a recipe website. You can check it out at

It uses the Bootstrap framework for the layout, Typeahead.js for the searching, and PHP with Postgres for the back end.

You can download the code over on GitHub screenshot screenshot


  • LibreOffice Base front-end for easily loading in data
  • Support for sub-recipes (eg. for sauces or whatever)
  • Uses the popular Bootstrap 3 framework
  • Instructions and About sections support Markdown
  • Fractions look like fractions
  • Search / Autocomplete box
  • Random meal generator
  • Works well on mobile devices and on the desktop
  • Support for marking recipes as favorite or quick (or both)
  • Browse recipes by ingredient or by category
  • Nice print specific CSS makes for easy hard-copy recipes
Posted in Something Interesting | Leave a comment

How to Flip All of XOrg Upsidedown

I recently hung an old iMac upsidedown from the ceiling to be used as a media center. It’s out of reach of the kids, but I needed to flip the video upside down. Since I am using Linux, I needed X11 to be inverted.

Upside Down Mac
Upside Down Mac


It ended up being really easy.

1) Generate an xorg.conf file:

sudo X -configure

(This is saved in ~/

2) Copy the xorg.conf file to /etc/X11
sudo cp ~/ /etc/X11

3) Restart X to make sure the conf file is good
sudo service kdm restart

(or sudo service lightdm restart, or whatever you’re using)

4) Edit /etc/X11/xorg.conf
Find the “Monitor” section and add this line:

Option "Rotate" "inverted"

5) Restart X11 again to apply the change. It should now appear upside-down


One shortcoming — If you have an built-in video camera, this does not flip the video camera upside down too. Since this is a media center, they won’t be needing the video camera at the moment.

Posted in Computers, Projects, Something Interesting | Leave a comment

GeoServer GetLegendGraphic Fails With “Width (0) and height (0) cannot be <= 0″

I had a weird issue with WMS GetLegendGraphic requests failing with the following message:

<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE ServiceExceptionReport SYSTEM ""&gt ;<ServiceExceptionReport version="1.1.1" &gt ;<ServiceException>
java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0
Width (0) and height (0) cannot be &amp;= 0

This was weird because my request definitely included non-zero height and widths, like so:


Eventually I tracked it down to an issue with the SLD xml. The XML was valid, but GeoServer didn’t like the use of CDATA tags inside of <Name>,<Title> and <ogc:Literal> tags.

So anywhere with formatting like this

<![CDATA[Parcel Area]]>
<![CDATA[ Low Density Residential ]]>

had to be changed to

<Name>Parcel Area</Name>
<Name>Low Density Residential</Name>

Once I got rid of the CDATA tags everything worked beautifully.

This issue was on GeoServer 2.5. YMMV, etc.

Posted in Computers, GIS Portfolio, Programming | Tagged , , , , | Leave a comment