@dangayle

JavaScript setInterval is a pain in my behind

I’ve been debugging some javascript code that uses the setInterval function to loop through some some code, and I was pulling my hair out. Apparently there is a bug in the ECMAScript (AKA, JavaScript) itself concerning that function, where it doesn’t keep track of the process like a normal variable/function declaration should, so if you lose the reference to each and every instance of it, WHOOF it’s gone and you’re busy debugging something that SHOULD WORK (but doesn’t).

So yes, if you have ever wondered the best way to use setInterval, the dude at Wall of Scribbles done figured it out for you:

setInterval(): the sneaky basterd child of JavaScript

Deep Fried Beer

We were joking at the Spokane Build Guild meeting last week, when someone suggested Deep Fried Beer.

Such a good idea. Deep Fried Beer. It’s like combining Darth Vader and Pink Floyd into one entity, it’s so cool.

This of course leads us to wonder, “IS it possible to deep fry beer?”

Yes. Yes, indeed.

The coolest OSX screen saver yet

If you’re into cats, that is. I’m not really into cats, but I am into annoying my room mate. This screen saver is likely to strain our relationship, but it is totally worth it.

Here’s the plan:

1) We will take this website (http://procatinator.com/):

2) Download the websaver screensaver from google code. (http://code.google.com/p/websaver/)

3) Add http://procatinator.com/ to the settings of websaver:

4) Enjoy, as random cat images dance to random youtube music whilst your room mate gets angry with you when you computer playing random music when you leave the room.

Laura’s Twelve Hundred Times

Laura is one of my all time favorite post-rock bands, despite the fact that a lot of people have never heard of them. Epic on the scale of Godspeed, but with less of the extended filler sections (Sorry Godspeed, you’re amazing, but seriously. If you tightened some of your stuff up, I’d listen to you more. As it is, some of the sections within some of your songs are like Robert Fripp’s noodling “improvs” in mid-era King Crimson. Probably fun at the time, but not really that musically interesting. But I digress.)

They’re heavy, soft, quiet, loud, intense and -->Insert post-rock adjective here<-- but to the best possible degree. Also, one of the rare post-rock bands that doesn’t mind having vocals. Andrew Chalmers’ voice kinda reminds me of Greg Lake of King Crimson/ELP, breathy and soothing, but with an edge. (Bonus points for two references to KC in one post! I’m on a roll!)

Anywho, new album. I’m in love!

How to globally remove Opera and KHTML vendor prefixes from your Compass stylesheets

First of all, use Compass to write your stylesheets. That way this:

.test {
    -moz-border-radius-topright: 4px;
    -webkit-border-top-right-radius: 4px;
    border-top-right-radius: 4px;
    -moz-border-radius-topleft: 4px;
    -webkit-border-top-left-radius: 4px;
    border-top-left-radius: 4px;
}

can be written like this:

.test{
    @include border-top-right-radius(4px);
    @include border-top-left-radius(4px);
}

But wait? This is what Compass ACTUALLY outputs (And I always forget that MS has decided to jump into the vendor pre-fixed CSS3 game also. Yay.):

.test {
    -moz-border-radius-topright: 4px;
    -webkit-border-top-right-radius: 4px;
    -o-border-top-right-radius: 4px;
    -ms-border-top-right-radius: 4px;
    -khtml-border-top-right-radius: 4px;
    border-top-right-radius: 4px;
    -moz-border-radius-topleft: 4px;
    -webkit-border-top-left-radius: 4px;
    -o-border-top-left-radius: 4px;
    -ms-border-top-left-radius: 4px;
    -khtml-border-top-left-radius: 4px;
    border-top-left-radius: 4px;
}

I love Konquerer and Opera, really I do, but not at the expense of all that extra cruft in my CSS that only .5% of my total visitors will ever use. So how do I globally remove all Opera and Konquerer vendor-prefixed CSS3 from my Compass processed CSS?

At the top of your base SCSS file, add the following Compass variables:

$experimental-support-for-opera:false;
$experimental-support-for-khtml:false;

Now the results are what I want:

.test {
    -moz-border-radius-topright: 4px;
    -webkit-border-top-right-radius: 4px;
    -ms-border-top-right-radius: 4px;
    border-top-right-radius: 4px;
    -moz-border-radius-topleft: 4px;
    -webkit-border-top-left-radius: 4px;
    -ms-border-top-left-radius: 4px;
    border-top-left-radius: 4px;
}

Confirm close

My attempt to freeze my computer

62 tabs? That’s it? Did I ever tell you about the time… But seriously folks, I’ve had up to 73 tabs open, but without this visual confirmation. I think I posted somesuch to the Twitters a long time ago, but it’s long gone the way of the electric dodo bird.

Pages