↓ Archives ↓

do too many ‘social’ friend con­nec­tions harm innov­a­tion? http://ping.fm/8A1Fr

Drunken funk

Lame­book is awe­some. Bad things happen after 6 beers Non-sense Good frind Ran-dumb

Post grammar anarchy

narchy, post grammar

R.I.P. Michael Jackson

pedo-jacko-lol

PEW PEW CHK CHK BOOM

Pew pew chk chk boom

Advertisement placement

Google has no shameAh, Google, such sweet irony. (The full size image is linked to the thumbnail.)

new Quandries();

I’ve been writ­ing things in PHP for the past 8 weeks that it isn’t really meant for or to do. To whit:
  • dae­mon­ised processes;
  • shared memory based meth­ods and usage (mainly around SysV sem­a­phores and segments);
  • cron exten­sions and handlers;
  • net­work con­nec­tions via SNMP and SNPP; and
  • lots of file sys­tem meth­ods (glob­bing, file man­age­ment and organisation),
I really do feel dirty.

Happy CSS Naked Day!

It’s that time again. Thanks to the W3C for mak­ing this all pos­sible! (Spe­cial thanks to Dustin Diaz for the ori­ginal idea.)

CSS Naked Day

With CSS Naked Day fast approach­ing, I thought I’d add to the code snip­pets pos­ted by Dustin Diaz with a quick bit of Perl, based on his PHP example. Without fur­ther ado, here is the snippet:
use Time:Local;

sub _is_naked_day() {
    my ($start, $end, $now, $d);
    $d = shift;
    $start = timelocal(0, 0, 0, $d, 3, ((localtime)[5]));
    $end = timelocal(59, 59, 23, $d, 3, ((localtime)[5]));
    $now = time();
    if ( $now >= $start && $now < = $end ) return(1);
    else return(0);
}
This sub­routine could then be used to dis­play tem­plate con­tent like so:
unless ( (&_is_naked_day(9)) ) print qq^<link rel="stylesheet" type="text/css" href="/path/to/styles.css" />^;
Caveats: I haven’t accoun­ted for time zone dif­fer­ences, the concept of an inter­na­tional day (tak­ing a 12 hour slice on either side of GMT) and the JSON con­fig file that Dustin provided in 2008 (which I just found). I’ll write a Perl mod­ule to handle this all in a more usable fash­ion and post it up after work later today.

Ran­dall Stross has a dis­turb­ing ana­lysis of the text mes­saging pri­cing struc­ture over at the NYT[1]. [1] http://ping.fm/wkUUs While this is a ana­lysis of the US telco SMS stack, it’s pretty applic­able to the Aus­tralian gang of four as well. An inter­est­ing (and some­what dis­turb­ing) read.
Stop SOPA