Installing Mapnik on Ubuntu 7.10

I have managed to install mapnik 0.4, 0.5, 0.5.1 and various SVN releases in-between on Ubuntu. While this isn’t in itself exciting, I think I manage to stumble at every installation. I typically forget to add the flags when building, so, to prevent myself from stumbling again, I’m going to write them out here. Build mapnik $ python scons/scons.py PYTHON=/usr/bin/python \ PGSQL_INCLUDES=/usr/include/postgresql \ PGSQL_LIBS=/usr/lib/postgresql BOOST_INCLUDES=/usr/include/boost BOOST_LIBS=/usr/lib Then install it $ sudo python scons/scons.py install PYTHON=/usr/bin/python \ PGSQL_INCLUDES=/usr/include/postgresql \ PGSQL_LIBS=/usr/lib/postgresql BOOST_INCLUDES=/usr/include/boost BOOST_LIBS=/usr/lib …
Read Installing Mapnik on Ubuntu 7.10

And Yet Another Remodel

I have finally decided to do another remodel of this site. I had a few goals before starting: Use one image Use the YUI-CSS framework Use Django Make it easily extendable So far, I think I’ve accomplished these goals. The site is easier to read, easy to modify, and has a few new features. More entries to come!
Read And Yet Another Remodel

Database Woopsie

I returned to my computer today to notice I had the following error: (145, "Table './databasename/comments_freecomment' is marked as crashed and should be repaired") Darn. The solution is quite easy, however: mysqlcheck -uUsername -pPassword databasename comments_freecomment Now you know what you already know, you can fix it: mysqlcheck -r -uUsername -pPassword databasename comments_freecomment If that doesn’t work, you can try a slightly different method. First, go to the location where your databases are stored on the disk (most likely something like /var/lib/mysql/databasename). Next, stop the database – and try to free up as much memory as possible. Then run:
Read Database Woopsie

GPS on the SkypePhone

Yesterday I was sort of curious if I could use my 3 Skypephone in a pinch if I got lost, which here in Sydney, happens quite often. Luckily 3’s Skypephone has both Bluetooth, and supports j2me apps. Mobile GPS unit, here I come. The recipe to get maps on your Skypephone is pretty darn easy. You’ll need one dash bluetooth GPS receiver (I have the Qstarz BT-Q1000), TrekBuddy, a TrekBuddy acceptable map (easily downloadable), and one dab computer – but since you’re reading this, I figure you’ve got that part taken care of.
Read GPS on the SkypePhone

Size of Uncompressed OSM File

I’ve been playing around with OSM a little lately, and have been meaning to construct my own slippy map. At first I wanted to do it on my VPS – but with rather limited storage, and even more limited memory, there just isn’t a way. Three problems exists: the first occurs when trying to use osm2pgsql to import the OSM file into the database. Current records state that this typically uses 650+ MB, something my 512MB VPS just doesn’t have (although I’m writing some code that might make this possible in the future).
Read Size of Uncompressed OSM File

Using Distcc

I’m in the process of working on one of my projects, and the requirement came up to download a fairly large file (4GB). Since I only receive ~20GB/month at my house, I decided to just use my server in the U.S. The next requirement came about needing to compile Mapnik, which I had intended to do on the server at some point anyways, yet I ran into memory constraints. Good old distcc comes to the rescue. I don’t need to use distcc that often, yet when I do, it is very handy. However, I always forget to set g++ to use distcc as well. So, for when I forget next time…
Read Using Distcc

Zenity GUI to a Shell Script

I have to admit, I’m pretty lazy. I don’t (ironically) like to type, and I really don’t like typing the same command over and over. I found myself switching between my external monitor and laptop quite frequently, and decided to somewhat automate the task. Although I know there are other programs out there that allow this, they either had too many features, or crashed. Xrandr works just fine, but like I said, I’m lazy…
Read Zenity GUI to a Shell Script

Mass Spam Delete Django

As you can read, I’ve been traveling around quite a bit lately. This means I haven’t been checking the comments on my blog, which means quite a bit of spam has been entered. I am blocking the spam via akismet, however, it is still recorded in the database. Being somebody who hates cluttered desktops, you can imagine how I feel about having a lot (447) of spam. Well, since akismet flips the is_public switch True for good comments and False for bad comments, that makes a really easy query in mysql.
Read Mass Spam Delete Django

Works With Windows Vista

I’m in Tibet right now, so will keep this somewhat brief. For the next few hours I’ll be sitting in this dingy internet cafe in Lhasa updating my blog with my travels. I happened to look down and on the monitor it says “works with windows vista”. I find this quite humorous, of course it is going to work with vista, it is a normal generic monitor. Anyhow, I guess there is a reason for marketing. Back to writing our travels.
Read Works With Windows Vista

Last Xenful Comments

One of the biggest things I regret is not utilizing Xen more. I’ve finally been admitted to Amazon’s EC2 Limited Beta, just two days before I leave, so not enough time to actually do anything fun. However, I think Xen is an ideal infrastructure aid for SMEs in particular. The cost of technology is continuing to decrease, which means bigger servers cost less. This is great for the small/branch office. Let me explain.
Read Last Xenful Comments