The RoLLing cOde

Rumor, crap and –un–original

Archive for December, 2008

Detect ActionScript 2/3 in TextMate

without comments

I made
a very rough tmplugin
(TM 1.x OSX 10.4+ UB) to search the word “package” in the beginning of first 20 lines of .as file to determine whether it’s AS3 or AS2, then select a proper bundle. It’s modified from
TabMate
.

You should have
ActionScript
and
ActionScript 3
tmbundle before install this tmplugin. 

Written by freewizard

December 12th, 2008 at 7:07 am

Posted in Crap

Tagged with ,

Growl notification for 1G1G.com

without comments

It’s a
Fluid
SSB user script.

// ==UserScript==
// @name        1G1G
// @namespace   http://fluidapp.com
// @description Show Growl notification when song changes
// @include     *
// @author      freewizard gmail.com
// ==/UserScript==

(function () {
    if (window.fluid) {
        window.lastTitle = "亦歌-自由自在听音乐";
        setInterval(function() {
            if (document.title == window.lastTitle) return;
            window.lastTitle = document.title;
            window.fluid.showGrowlNotification({
                title: "亦歌",
                description: window.lastTitle,
                identifier: "www.1G1G.com"
            });
        }, 1000);
    }
})();

Written by freewizard

December 8th, 2008 at 3:38 pm

Posted in Crap

Tagged with