Select Page

Poor mans light box

I came across a article at Strobist detailing a very cheap light box setup and decided to build one.


It is basically a cardboard box, some tracing paper and a sheet of paper like you’d use to make a school poster on. I didn’t have anything, not even the tape to stick the bits together or something to cut with, I also had to buy 30 sheets of tracing paper since that was the smallest they sold and it all came to about 14 pounds. I had a box here from when I moved to the UK almost 5 years ago so figured its about time I do something with it.

It took about 10 minutes to slap everything together, Pixel found it all very amusing so all round a lot of fun.
Using it is a snap, I’ve not tried it using a desk lamp or something but really cannot imagine why it won’t work, with my SB-800 fully wireless remote flash I works a charm as you can see from the first shot above. The final results can be seen on flickr here with one of the shots below.

Location aware Bind

I have a client who needs to host graphic content closer to their audience, partly to speed things up for their audience but also to allow them to save some money on bandwidth bills by spreading it out to cheaper hosts.
The obvious answer is to just use Akamai, but unless you have a huge amount of bandwidth it does not really make financial sense. So I proposed we get a few UML / Virtual Machines at ISPs and host the images there. Typically we’d just round-robin the A record but this doesn’t give us any geo-awareness.
I googled a bit and came across a guy who made a patch to bind 9.2.4. He bascially hooks the Maxmind GeoIP C Library into ISC Bind. As it turns out thats exactly the version RedHat uses in their Enterprise distribution so it seemed like a winner.
The basic idea is to setup a view that matches countries rather than just IP Blocks as is the default supported scenario. A sample view:

view "us" {
match-clients { country_US; };
zone "geotest.devco.net" {
type master;
file "data/us-geotest.devco.net";
};
};
view "other" {
match-clients { any; };
zone "geotest.devco.net" {
type master;
file "data/other-geotest.devco.net";
};
};

The above will serve us-geotest.devco.net to visitors from the United States and everyone else will get other-geotest.devco.net. These 2 zone files are stock standard bind zone files, my sample just set a different A record in each.
To see this in action, first a query from my UK hosted machine:

% host geotest.devco.net
geotest.devco.net has address 193.201.200.135

and now a query from the states:

% host geotest.devco.net
geotest.devco.net has address 72.21.58.28

So to make a long story short, I’ve patched the stock RedHat Enterprise 4 bind RPM with the GeoDNS patch and am making the files available here, first I have the source files up if you want to look through them to ensure I didn’t put any funny stuff in them:
The actual patch from GeoDNS – I had to modify the file names in the patch since the one from the source site is made to patch from outside the bind source dir while RPM will change directory into the source directory before running the patch.
Changes made to the RPM Spec file
Sample config – this gets placed in the standard documentation directory
I’ve build a full RPMs of this on a CentOS 4.3 machine, the files are:
bind-9.2.4-2geodns.i386.rpm
bind-libs-9.2.4-2geodns.i386.rpm
bind-utils-9.2.4-2geodns.i386.rpm
bind-devel-9.2.4-2geodns.i386.rpm
bind-chroot-9.2.4-2geodns.i386.rpm
and finally a Source RPM that you can use to build this all on your own machine:
bind-9.2.4-2geodns.src.rpm
Before you can install these you’ll need to get GeoIP on your machine, CentOS has an extras Yum repository that you can enable in /etc/yum.repos.d/CentOS-Base.repo. Once enabled you can install it with yum:

# yum install GeoIP GeoIP-data
<snip>
Running Transaction
Installing: GeoIP                        ######################### [1/2]
Installing: GeoIP-data                   ######################### [2/2]
Installed: GeoIP.i386 0:1.3.14-2.c4 GeoIP-data.i386 0:20060501-2.c4

RedHat Enterprise has an extras CD, you can find GeoIP on there and install it using RPM.
The bind RPMs above should simply install on your standard CentOS/RedHat Enterprise box, be sure to remove all the old bind stuff especially bind-libs before installing these.

activeCollab

A year or so ago I had an account with Basecamp, the very successful project management system that spawned Ruby on Rails. I really liked it but the project manager at work didn’t so it kind of fizzled out and eventually I cancelled the $99/month account that we had.
You can try Basecamp for free on a single project and I’ve used it on and off since then, but it’s not been ideal for me to use a hosted service. I tried a number of other products like dotproject. Yesterday I came across a Digg article about activeCollab, it is a GPL licensed Basecamp like project management tool currently in Alpha release.
It requires PHP 5 which I didn’t have on any machine as it seems each of my machines has some code on that only works on PHP 4 but I did a quick install of it on a VMware machine and fell in love with it then put in the effort to fix up a PHP 5 on one of my servers. It is great, even in its Alpha state it is usable and reasonably bug free. I came across one error in tasks which I sent a patch about back to the authors other than that it works a charm.
Click the screenshot below for a view of it, or grab it from http://www.activecollab.com/

Digital Image Sharpening

A problem with DSLR’s seem to be that images tend to be a bit soft and fuzzy some times, this might just be because I do not spend 1000 pound on each lens or it might be a general problem. Regardless a solution exist in Photoshop.
Photoshop has a number of sharpening tools the most used one being the oddly named Unsharp Mask (USM). 100s of websites cover the USM and its drawbacks, a good one can be found at The Luminous Landscape. The short of it, too much sharpening a image leaves artifacts on your image like little halos and stuff.
Photoshops CS2 has a better sharpening tool called “Smart Sharpening” but I still prefer a bit of USM, I found a article that discusses both these sharpening tools and gives a sample technique for using the USM on edges of your image only, this effectively removes the problems with halos and so forth and means you can be more aggressive with sharpening your images.
I tried out the above edge sharp technique and really like it, I was considering buying a commercial sharpener but now I decided against it in favor of this technique.
I have a sample image up done with this method you can see the before and after.


I’ve made a Photoshop action for this technique, tested in CS and CS2. It’s very simple it should be the last thing you do to your image right before putting it on the web. Don’t sharpen your full size image then resize it, first resize and then sharpen. Sharpening is as easy as running this action and after some steps it will show a standard USM dialog with preview, you should immediately see the results by dragging the sliders.
The action can be found here, just drag it onto your Photoshop and look in the Actions Palette

Little Snitch

The OS X Operating System might be free of virii and trojans at the moment but I cannot imagine this situation will last. Also being free from malicious code doesn’t prevent otherwise trustworthy companies from ‘phoning home’ as is the case with OS X 10.4.3.
In the windows worlds the obvious answer is to just get the free edition of Zone Alarm but sadly there is nothing free in the Mac world.
I’ve often come across mentions of Little Snitch so I figured I’ll check it out, from its website:

You start an application that tells you that a new version is available. You suddenly realize that with every start this application connects to the developer’s server. Even statistics information about your computer may be sent this way. Little Snitch helps you avoid this situation.
Trojan horses – i.e. programs transmitting unconsciously data stored on your computer – can be detected by Little Snitch and prevented on the transmission of data.

So I tried its free demo for a few days and last night bought it via PayPal thanks to the strong Pound it was a bargain, below is a screenshot of it in action showing it even blocks shell commands etc.


I can really recommend this app, grab a copy if you are concerned about privacy and general security on your Mac.