Creating a 1px GIF with Perl

Ever wanted to create a 1 pixel transparent GIF with Perl? Me neither, but this is still neat to have in the toolbox.

My buddy Adam mentioned this at some point and although I’ve never had to use it and probably won’t ever, I thought it was kind of neat. (Obviously you don’t have to break up the string and concatenate it with periods – I just did that so it wouldn’t break weird on this page.) print "Content-type: image/gif\n\n"; my $pixelImg = 'GIF89a'.pack('H', '0100010080ff00c0c0' . 'c000000021f9040100' . '0000002c0000000001' . '0001000002024401003b');

Going from Perl to php

I wrote this cross-reference a while back for people who know how to program using Perl and are looking for some of the familiar Perl functions in the php language. When I originally write it, we were stuck with php 3 so I just reworked the list to include some of the functions that were missing back then. There are obviously more differences between the two languages than the function-to-function cross-referencing that’s listed here but generally, it’s shouldn’t be a hard transition. Continue reading “Going from Perl to php”

Extracting data from MS Access files on MacOS X

The only real way that I’ve found to extract data from an MS Access .mdb file on MacOS X is to use mdbtools. If you aren’t familiar with the unix underpinnings of MacOS X, this information might be too much for you. Otherwise, this is a step-by-step list of what I had to do to get mdbtools to compile and get useful data from a .mdb

The only real way that I’ve found to extract data from an MS Access .mdb file on MacOS X is to use mdbtools. If you aren’t familiar with the unix underpinnings of MacOS X, this information might be too much for you. Otherwise, here’s a list of what I had to do to get mdbtools to compile. Continue reading “Extracting data from MS Access files on MacOS X”

Compressing URLs to make them shorter

This one time, I thought maybe I’d try compressing URLs to make the query strings shorter.

At some point, I thought I might try to compress long URLs to make them shorter. Like if you had a web application that used very long query strings, you could turn the list of name=value pairs into one compressed string that you’d then pass as PATH data. Ie: a URL like http://yoursite.com/scriptname?name=value would become http://yoursite.com/scriptname/compressed_string Continue reading “Compressing URLs to make them shorter”