Category Archives: Code

Serverside PUT Using PHP

It is possible to do an HTTP put, server side, in PHP without using a PECL extension or curl. This code is far from perfect but it shows how to accomplish the task. function httpPut($url, $data, $optional_headers = null) { … Continue reading

Posted in Code, Geek | Leave a comment

No, It's Not OK

The code below is broken in a subtle way. There’s no way to know that ptr is aligned on a boundary that your CPU architecture may require. And I don’t think there is any way to know until runtime. Oh, … Continue reading

Posted in Code, Geek | Leave a comment

Regenerating Large Mailman Archives

In the fall of 2005 a server that I operated was broken into. The perpetrators defaced every index.* file on the system including those in the archives of a mailing list that I’ve run since December of 2005. Recently it … Continue reading

Posted in Code, Geek, Site, Software, Tips | Leave a comment

Incrementing Version Numbers

Dealing with software version numbers is a pain. If you try to do it manually you will invariably end up forgetting to update the version information in your source code or forget to commit the changes. Having programatic access to … Continue reading

Posted in Code, Geek, Tips | Leave a comment

Visual Studio 2005 Express SP1 Deployment Woes

This past Friday at work I faced more Microsoft Visual Studio 2005 Express deployment woes. My IT department pushed Service Pack 1 for Visual Studio 2005 Express to my machine. I never pay attention to what is pushed to my … Continue reading

Posted in Code, Geek, Tips | Leave a comment

New Version of tcl-dox Released

Nigel Rook found and fixed a bug related to namespace handling. I’ve applied his patch and done some very minor cleanup of existing files. The new release is here.

Posted in Code, Geek | Leave a comment

Using sizeof in a smart way

It seems that very few people comprehend how powerful C and C++’s sizeof operator really is. People insist on using sizeof on typenames. Folks, you don’t have to do that! Typical code: struct foo *f = malloc(sizeof(struct foo)); The way … Continue reading

Posted in Code, Geek | Leave a comment