Because I keep forgetting how to.
In response to this thread on the empeg BBS, I hacked together a couple of small tools for the empeg car player.
I'm at DevWeek this week, and I went (among other things) to a couple of WCF presentations by Aaron Skonnard.
So, anyway, last night I put together a really simple WCF service. It looks like this:
Essentially, you write a new task like this:
<define name="echo3">
<echo message="${this.message}"/>
<echo message="${this.message}"/>
<echo message="${this.message}"/>
</define>
...and then you call it like this:
<echo3 message="Hello World"/>
Any parameter passed to the defined task is available as this.foo inside the defined task. I've found it useful when you don't want to write a task in C#, perhaps because all you're doing is calling a bunch of other NAnt tasks.
I just started using TeamCity Professional Edition for some personal projects (and we're evaluating the Enterprise edition for use at work).
ReSharper allows you to define "Live Templates". They're like Visual Studio snippets, but much more useful. So that I don't lose mine, I'm going to stash them here.
When I'm supreme ruler of the universe: If you've taken more than 5 days vacation, employers will be required to let you work only a half-day on your first day back. It could be the morning, or the afternoon, but you'll be required to work only 4 hours.
To the tune of the twelve days of Christmas...
12 Piper Heisecks 11 Flaming Absinthes 10 Gin and Tonics 9 Tequila Slammers 8 Black Sambucas 7 Whiskey Sodas 6 Vodka Redbulls 5 Goldschlagers 4 Cointreaux 3 Rum Cokes 2 Mai Tais ...and an ice cube in a Baileys...
The last couple of entries have shown the hex dumps of the individual packets. We'll step back to a slightly higher-level view now.
The first thing that emplode does when it contacts an empeg player is ask it what kind of player it is. Emplode needs to know this so that it can display the correct icon in the discovery window. I'll write up something about how empeg discovery works later.
The next packet that the empeg sends is the actual response to the OP_STATFID request. It looks like this:
0000 02 0c 00 07 01 95 00 81 80 00 00 00 00 07 00 00 0010 00 0c 00 00 00 7c 7c
(Don't worry; I'll stop showing the hex and I'll start talking about higher-level stuff shortly).