↓ Archives ↓

Category → meme

Happy CSS Naked Day 2011!

As per the excerpt on Dustin Diaz’s web­site devoted to CSS Naked Day, the concept is about pro­mot­ing semantic markup for web­site content.
The idea behind this event is to pro­mote Web Stand­ards. Plain and simple. This includes proper use of (x)html, semantic markup, a good hier­archy struc­ture, and of course, a good ‘ol play on words. It’s time to show off your <body>.
Think before you style!

Happy CSS Naked Day for 2010

What happened to the design?

To learn more about why styles are dis­abled on this web­site visit the Annual CSS Naked Day web­site for more information.

Happy Easter

It's a miracle!

Post grammar anarchy

narchy, post grammar

R.I.P. Michael Jackson

pedo-jacko-lol

PEW PEW CHK CHK BOOM

Pew pew chk chk boom

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.
Stop SOPA