sam keen's corner of the web

Author Archives: sam keen

Getting MySQLdb For Python Working on Snow Leopard

I’m just getting into Python and Django programming so I’ve been tinkering with the tutorials online to get familiar with it.  I develop on a Macbook running 10.6.x and the pre-installed Python was working just fine for me until I needed to connect to MySQL for some of the Django work.  To do this you [...]

Using Unicode To Increase Information Density in Tweets

Quite a while back I grabbed the twitter handle @pdxweather with plans to broadcast the local weather over it.
I first thought I would send out a daily broadcast for today’s weather and tomorrow.  Being Portland, Oregon, I’m centering around the “Chance of Rain” for those days at least as a starting point. This has proven [...]

Installing Git Manpages on Snow Leopard

When Using Git do you get this frustration:
$ git help pull
No manual entry for git-pull

If so, there is an easy fix
First, note the git version you are using
$ git –version
git version 1.6.4.2

Then download the appropriate tarball from kernel.org
curl -O http://www.kernel.org/pub/software/scm/git/git-manpages-{YOUR VERSION}.tar.bz2

Then determine your manpath for /usr/local (here it is /usr/local/share/man, yours may be different)
$ cat [...]

10 Minutes to a Leaner LAMP stack

For this quick article I am only going to quickly cover the A and the M of the LAMP stack.
The Setup
Assumptions: You have root on the server in question or you at least have enough server access to effect the configuration of Apache and MySQL.
The test server setup:

A Virtual Private server running on Rackspace cloud
Ubuntu 9.04 [...]

Some Experiments with Canvas Drag and Drop

I’ve been toying around with canvas tag and learning the ins and outs of Drag and Drop
I created a little proof of concept app that allows you to add markers to an image.  The meta about the markers (relative location, marker symbol, desc, color, etc) are stored in a DB on another server using JSONP [...]

ipad: My impressions

Sexy little (well medium i guess) device. As a software developer though I cannot see it replacing my laptop (currently a msi u123). I don’t see writing code on a ipad.
Also, it would not be replacing my phone. I guess we will be able to use skype (or skype-like services) on the [...]

vnstat : excellent networking tool

I recently found myself considering moving one of our servers to the Rackspace Cloud. I needed to get an estimate of the cost for bandwidth usage.
I remembered I had installed vnstat on that server when it was deployed.  This made the bandwidth calculation completely simple:
Just have vnstat give me the bandwidth sliced by Month:
$ [...]

Your First PHP Development Environment

I’m teaching a PHP/MySQL course at the local community college this fall.  First order of business is to get everyone set up with a PHP development environment.  I decided to go ahead and post the strategy for the course as a post here in case it may be helpful others just starting out in PHP [...]

Portland Restaurant Health Map

Inspired by Toby Segaran’s creation of a heat map of restaurant health inspection scores for San Francisco, I set out to do the same for Portland, Oregon.  I was able to scrape establishment records from the existing Multnomah County Food Establishment Inspections Search.  Then I got lat/longs for those addresses using Google’s geocode API.  Using [...]

SOLR : very impressive lucene based search tool

Very impressed with Solr and the development community behind it. http://lucene.apache.org/solr/
1.5 days of research, submitted bug and resulting immediate patch and I have a fully functional search engine for a project at work.
If you’ve ever thought it would be nice to have your very own google type appliance, I highly recommend you check out solr [...]