Asus Laptop Reclaimed

I’ve successfully installed Debian Linux on an old Asus Laptop.  My wife used it for a few years, but she was trying to use it for word processing, and a few of the keys stick every now and then.  It’s been a goal of mine to get it running a newer version of linux, but the CD drive is bad, so installing from a iso is out of the question.  I kept meaning to install from usb drive, but the only one we have that didn’t have files I cared about on it was only 128 MB.

Anyway, I got a 1 GB usb drive from my insurance agent.  Score!  Oh, they still have the road atlases, but the free stuff has gotten considerably cooler.  I followed the instructions here and it worked like a charm:

WordPress 3.0 installed

WordPress 3.0 is installed and running.  The upgrade was really simple, though I imagine it could have been easier if I would take a little more time and figure out why my hosting provider’s sftp doesn’t play nice with WordPress.  I’m sure I’m probably missing a setting somewhere, but I can’t seem to find it.

Shameless Self Promotion

Well, ok, maybe it’s not entirely shameless, but it’s certainly self promotion.  I recently set up a WordPress blog for my wife.  She’s an avid knitter, and she enjoys creating color-work charts.  Of course, getting the site to show up on “the Google” for the keywords we want isn’t exactly an easy task.  It takes the right content, the right keywords, popularity, links and probably quite a bit of dumb luck.  The experts call that stuff SEO, or Search Engine Optimization.  As a web developer, I call it a necessary pain in the neck.  Anyway, visit it here at Free Knitting, Crochet, Needlepoint and Cross-Stitch Charts for Charity, and help us out.  Thanks!

We’re also trying to be conscious of the fact that just taking any old picture and converting it into a chart is likely to infringe on the copyright of the original image, so all of the original images come from public-domain sources.  Since I gave myself a plug, I’ll do the same for the sites we got the images from because they are… well… plain awesome. and are both wonderful sources of public domain images.  They also both make a good faith effort to ensure the images are truly in the public domain.

PHP Safe Mode

I just ran into a problem with a WordPress blog I was setting up. I couldn’t upload any images or files to it. It turns out, my hosting provider, Nearly Free, uses PHP safe_mode by default. It’s not that difficult to overcome, but it can be confusing when you run into it. Basically, it adds one additional level of protection to the classic user/group/other protection scheme in unix. Normally, all you need to do to allow a directory or file to be writable is to change the group to the same group that the web server is running under. For, this is the “web” group. However, with PHP safe_mode, this doesn’t quite cut it. You also need to make sure the script that is doing the writing is also in the “web” group. A quick and dirty way to do this would be the following commands.

$ cd /home/public
$ chgrp -R web *
$ cd /home/public/wp-content/
$ mkdir uploads
$ chgrp web uploads/
$ chmod g+w uploads/

The first chgrp is the “quick and dirty” part. That sets the group for all your files to web. It’s much safer to find out which scripts are actually doing the writing and set only those to the web group. was nice enough to write this up as well in a blog post a few years back.  Writing Files in PHP

Testing APIs

I’ve been doing a lot of web API testing lately.  There are two main flavors of web APIs:  SOAP and REST.

SOAP is verbose, ugly, and generally awful to work with.  In order to work with SOAP APIs first, you need to have a SOAP library for your language of choice.  Then you have to generate a “driver” specific to the API you are working with.  Next, you have to figure out the commands that are available, and finally, you have to parse though the xml that the calls to the API return.

REST, on the other hand, is simple.  Call a url with query parameters like you would a normal web page.  Get a result in xml, json, or whatever other format the API supports.  Parse it.  Done.  The main benefit is that testing is much easier.  Fire up your friendly neighborhood web browser and paste in the url and look at the xml returned.

But not so fast!  That’s all well and good for reading an API, but what about sending data?  For that, you can sometimes use a web browser too, but not always.  Most REST APIs require POSTs to create objects.  For that, you need a bit more.  If you like GUIs, one option is a Firefox plugin called REST Client that I’ve found works great.  For the command-line there’s cURL.  Here are a couple examples of how to use cURL.

# If the API requires authentication
curl -u user:pass -F "file=@filename_to_send"

# If the API requires you to set the content type and send raw data
curl -H "Content-Type:text/xml" -d @filename_to_send

Controlling My Online Identity

Howdy and welcome.  Amazingly enough, even though I’ve been in technology for my entire career, I’ve never had a public blog before.  I did have a live journal for a while, but I kept the whole thing private, so that doesn’t really count.  I’m using Twitter and Facebook as well, but those are limiting when it comes to how much you can write and what kind of things your friends are really interested in seeing.  I also have been listening to This Week in Google with Leo Laporte and Jeff Jarvis, and there have been a lot of discussions on privacy vs. publicness on that show lately.  The changes to Facebook’s privacy policies have been calling into question whether we can really control our online identities when we proxy them through a third party.  I’m not sure what the answer is, but my decision to purchase “” and start this blog has a lot to do with those discussions.  I believe controlling this domain and using it as a place to post my random musings and ideas on technology is a good way to start controlling my identify online.

At the moment, I’ve locked this blog down pretty tightly.  I’ll open it up more as I figure out exactly how I’m going to use it.  I’ll freely admit this is an experiment and that only time will tell exactly what it will be.