3 Jul 2010

Baby Watermelon

17 Jun 2010

Switched to posterous

I've switch from WordPress to Posterous.  Hopefully I didn't break too much stuff.
13 Oct 2009

TextMate command for generating ActionScript getter/setters

Based on this

I just changed the format of the code to match the existing code at work.

Command configuration:

Save: nothing

Input: Entire Document

Output: Insert as Snippet

Activation: Choose whatever you want, personally I prefer using “get” as a Tab Trigger

Scope Selector: source.actionscript

Command:

#!/usr/bin/ruby
txt = STDIN.read
vars = txt.scan(/^\W*(private|public){0,1}\W*var\W*\_(\w*)\W*\:\W*(\w*)/)

ascript = <<-EOF
tell app "TextMate" 
    activate
    choose from list { %s } with title "Variable auswaehlen" with prompt "Welche Variable als Basis benutzen?" 
end tell
EOF

displayList = []
varList = []
vars.each_with_index do |x,i|
    scope = x[0]
    name = x[1]
    type = x[2]
    urStr = ""
    if ( scope != nil )
        urStr += "(" + scope.capitalize() + ") "
    end
    urStr += "_" + name
    if ( type != nil )
        urStr += " : " + type
    end
    displayList.push( urStr )
    varList.push( { "name" => name, "type" => type } )
end

list = '"' + displayList.join( '", "' ) + '"'
ascript = ascript % list
params = "<< 'AS'\n #{ascript}\nAS"

cmd = open("|osascript" + params)
result = cmd.gets.chomp()
cmd.close

if ( result == "false" )
    exit
end

index = displayList.index( result )
item = varList[ index ]

getter = <<-EOF
public function get %s():%s{
    return this._%s;
}
EOF
getter = getter % [ item[ "name" ], item[ "type" ], item[ "name" ] ]

setter = <<-EOF
public function set %s(value:%s):void{
    this._%s = value;
}
EOF
setter = setter % [ item[ "name" ], item[ "type" ], item[ "name" ] ]

snippet = getter + "\n" + setter
print snippet
13 Apr 2008

TeamCity notifications via Growl

I've written a custom notification plugin for TeamCity that will send build notifications via Growl or JGrowl. You can get a copy here: http://code.google.com/p/tcgrowl/
6 Jan 2008

growlbuildlistener version 0.4

Just uploaded a new build of growlbuildlistener which fixed a problem with the build listener that caused it not to work. Check it out: http://growlbuildlistener.googlecode.com/files/growllistener-0.4.jar
7 Dec 2007

Awesome e-book management, calibre (formerly known as libprs500)

If you've got a Sony Reader, and don't like Sony's book management app (or you don't run Windows) you should definitely check out calibre. It lets you manage your ebook library, convert files to the Sony Reader format, tweak metadata about your books, manage the books on your Reader, preview the books. It will even download some newsfeeds and put them on your reader. It's open source, written in Python and runs on Windows, Linux and Mac OS. It also contains command line apps to do format conversions and to transfer books to the Reader. It just plain kicks ass. NOTE: libprs500 was recently renamed calibre. Different name, same awesome app.
23 Oct 2007

Moved to Word Press...

I moved this blog from slimeslurp.net/drupal to blog.slimeslurp.net.  It is now running on Word Press.  Drupal was overkill for what I was using it for.  File links for some things are currently broken.
10 Apr 2007

New version of growlbuildlistener released

Just released a minor update to growlbuildlistener. GrowlEcho now supports an optional sticky attribute to create "sticky" notifications. Also, GrowlListener looks for a build property called "gbl.endsticky" which, if set, will cause the Build Finished notification to be sticky. Check it out: http://growlbuildlistener.googlecode.com/files/growllistener-0.3.jar
18 Mar 2007

Ant build notifications via Growl

I've created a custom BuildListener for Ant that provides Growl notifications when your builds start/stop. It uses the JGrowl library to send messages. JGrowl also provides a Growl like notification system for any Java platform. I've also created an Ant task similar to <echo> that lets you send messages to Growl during your builds. You can get it here: http://code.google.com/p/growlbuildlistener/
24 Jan 2007

Upgraded to Drupal 5

Just upgraded to Drupal 5. Looking for a new theme.