Author Archives: M@

Ruby String.each

While I find Ruby to be a half-assed attempt at an object-oriented Perl, I have been using it quite a bit lately to stay consistent with a lot of existing intellectual property. One of the more maddening things is that … Continue reading

Posted in Coding, Linuxy, Rants/Tirades | Tagged , | 1 Comment

MySQL com_select Nugget

The com_select counter isn’t a raw count of how many SELECT operations the server has performed, but rather the number of SELECT operations that did not get returned from the query cache. To see the real number of SELECTs (assuming … Continue reading

Posted in Linuxy, Work | Leave a comment

SPDY for Apache

Mod_SPDY for Apache is out. If you don’t know what SPDY is, I’d recommend some light reading … or heavy reading if you’re that kind of person.  

Posted in Architecture, Linuxy, Products | Leave a comment

NConf 1.3.0 Pass-through HTTPD Auth

If you’d like to use NConf, but want your HTTPD, e.g. Apache, to do the auth for it, apply the below patch to set the NConf user to the currently authenticated user. — include/head.php.orig    2012-04-03 19:34:13.774594705 +0000 +++ include/head.php    2012-04-03 … Continue reading

Posted in Coding, Linuxy, Work | Leave a comment

find -delete

If I hear one more person recommend using a pipe to xargs or -exec rm -f {}  to the question “how can I make ‘find’ delete the files it finds?” I’m going to scream. It’s really simple: find /wherever -mtime … Continue reading

Posted in Coding, Rants/Tirades, Work | Tagged , | Leave a comment

Video Captcha Prior Art

Nucaptcha claims to have invented video captchas. They didn’t. Neither did I, proabably, but I have talked about them publicly a few times, including this blog post from 2009.

Posted in Architecture, Life, Products | Tagged , | Leave a comment

Caching Functions In Perl

Synopsis There are occasions, where you write a function that takes some parameters and outputs consistentish data. Example: sub add { my($first,$second)=@_; return $first + $second; } If you call add(1,1) you get 2: always. Consistent input yields consistent output. … Continue reading

Posted in Architecture, Coding, Linuxy | Tagged | Leave a comment

Sorting Strings Ending In Numbers In Perl

Synopsis I deal with a lot of names that look like “somedumbserver2” and “somedumbserver15”. Using Perl’s default sort, “somedumbserver2” comes before “somedumbserver15” because the character “2” is greater than the character “1”, and that’s where the sort stops.  This sort, … Continue reading

Posted in Coding, Linuxy | Tagged , , | 1 Comment

Fixing Mis-cased URIs Under Apache

Synopsis This is rather old code, but saved my bacon more than once.Runs under Apache with Mod_Perl, and corrects the URI requested when it is giving lazily. Thus a request for “/INDEX.HTML” is rewritten to “/index.html” as appropriate. Code =head1 … Continue reading

Posted in Coding, Linuxy | Tagged , , | Leave a comment

Merging Filesystems Virtually Under Apache

Synopsis This is rather old code, but saved my bacon more than once. Runs under Apache with Mod_Perl, and “merges” any number of filesystems. You’ll see the @docroots array that takes a list of “document roots”. These all need correct … Continue reading

Posted in Architecture, Coding, Linuxy | Tagged , , | Leave a comment