Author: admin

  • Tilestream: Tiles not found

    I just upgraded to a newer version of Tilestream. Unfortunately after doing that, all my maps stopped working. When I went to my Tilestream UI, I was able to see that it was up and it was finding the MBTILE files. When I clicked on info, it became clear that the URL had changed. Instead […]

  • node-xml2js causes “Can’t send headers…”

    Ugh! Turns out if you don’t use a new Parser for each request you end up exiting with “Error: Can’t set headers after they are sent.” Very annoying! https://github.com/visionmedia/express/issues/711

  • Installing NodePie on Ubuntu

    I was transferring my latest creation over to my hosted Ubuntu server and came across the most annoying error. I had to reinstall the NodePie module because it relies on compiled C code. I kept getting an error though about something called lib-expat. Anyhow, turns out you need to apt-get a new library: sudo apt-get […]

  • Transferring from MongoDB to CouchDB

    So I wanted to move a larger number of records from MongoDB to CouchDB. Here are the basic steps I took: I  just wanted a selected number of fields (name, address, longitude, latitude) so I used mongoexport to put it into a JSON Array: ./mongoexport -d cookography -c places -f name,address,longitude,latitude -o test.json –jsonArray Both […]

  • a DIV inside a LI

    Suppose you want to have a bunches of DIVs contained inside of a List Item… AND you want them to not mess with the height of the List Item and appear as a line of text? Well then, take this sample HTML: And apply this CSS:

  • PostGres – PostGIS on OSX Lion

    I recently just wasted a lot of time trying to get PostGIS up and running on OSX Lion. I wanted to do this so I could pull in Open Street Map data for the DC region and then play with it in QGIS and import it into Tilemill. I will be the first to admit […]

  • JSDOM Memory leaks

    JSDOM is a great little module for NodeJS which lets you parse a DOM on the server. The only problem is that it has a memory leak. Not a big deal if you are only going to instantiate a couple times. A little trickier if you are screen scraping and need to call it 1000s […]

  • For Looping jQuery Elements

    When you get a jQuery object back from a selector, you general loop through all of the elements it contains using .each(). However I wanted to use a For Loop because I wanted to access a bunch of elements at once. I am scrapping a table and I might want to access multiple elements to […]

  • Completely removing XCode

    XCode 4.1 is now free in the App Store. I wanted to completely remove 3.0 version I had. Luckily there is a simple command line option for doing an uninstall: sudo /Developer/Library/uninstall-devtools –mode=all

  • Dynamic DIV IDs in Jade

    Jade is an HTML templating language that works with Node.js and a bunch of other languages. It takes structured templates and converts them into HTML. Jade uses indentation to show what code should be within an HTML tag. It is also possible to use variables to generate text, they call it Interpolation and it is […]