Welcome to differentpla.net, where Roger occasionally posts snippets of code and other stuff that he feels like sharing with the world.
roger's picture

Generating SSL certificates for differentpla.net

Because I keep forgetting how to.

roger's picture

empeg tools

In response to this thread on the empeg BBS, I hacked together a couple of small tools for the empeg car player.

roger's picture

Odd behaviour with WCF base addresses and HTTP.SYS wildcards

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:

roger's picture

<define> task for NAnt

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.

roger's picture

Tweaking TeamCity

I just started using TeamCity Professional Edition for some personal projects (and we're evaluating the Enterprise edition for use at work).

roger's picture

Roger's ReSharper Live Templates

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.

roger's picture

When I'm supreme ruler: Vacations

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.

roger's picture

12 Drinks of Christmas

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...
roger's picture

Getting the player type of an empeg

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.

roger's picture

An empeg reports results of OP_STATFID

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).

Syndicate content