[ View menu ]

Monthly Archive March, 2007

The Moon

March 29, 2007


PHP Excel Export class

March 27, 2007

Following the code that I found here, I made a quick PHP4 class that creates a single sheet Excel file. The class has a download() function that will send the appropriate headers for a binary download.

Adding keyword and description meta tags to Gallery2

The File
Find the template.tpl file for your current theme. I found mine here:
gallery2/themes/matrix/templates/template.tpl

Resealed Pentax ME Super

I used Jon Goodman’s kit (interslice on eBay) to do the resealing. His instructions are pretty clear, but I had a hard time distinguishing between the sealing materials. Overall, it probably took me an hour and a half.

CCD cleaning… SUCCESS!

March 22, 2007

.
The main tool is a cut up credit card with a folded up Pec-Pad attached by a paperclip. The end is drenched in Eclipse and I give the CCD a few good swipes. Sometimes I like to follow it up with a couple good puffs from the Giottos blower, giving any CCD dust […]

Adding leading zeros in PHP

March 20, 2007

function leadingZeros($num,$numDigits) {
   return sprintf("%0".$numDigits."d",$num);
}
 
echo leadingZeros(1,2);     // 01
echo leadingZeros(11,2);    // 11
echo leadingZeros(11,1);    // 11
echo leadingZeros(253,4);   // 0253

According to a post on the PHP.net page for str_pad(), sprintf() is much faster for this purpose.

Viewing your site before domain propagation

March 19, 2007

So you just bought a new domain name and/or a new host and you want to see everything in action, but you can’t yet because your domain hasn’t propagated! Luckily, there’s an easy way to temporarily jump forward in time.
The quickest and easiest work-around is to just edit your hosts file so that your […]

Malibu Creek hike

March 18, 2007

I tried my first infrared photograph out in the wild:

View the gallery

min-height for Internet Explorer

March 14, 2007

Here’s my favorite, easy work-around for the lack of min-height support in Internet Explorer 6.0: