Green Smoothies

Every morning I make a green smoothie, I figure since there are protein supplements why not a fruit and vegetable supplement (not a fruit/vegetable replacement or an excuse to eat junk food). Here's how I make them:


BrowserID and jQuery

I've been trying out BrowserID and for some reason binding BrowserID's navigator.id.getVerifiedEmail() to click events using jQuery never seems to work. I looked through BrowserID's sample code and found that they noticed the same thing (lines 125 - 133 as of this writing). So instead of using jQuery:

Try something like this:


Makeflle target to enable Go debugging symbols

In my copious free time I've been learning Go. I'm currently learning how to debug Go programs with gdb. Turns out the linkers ([68]l) need the  '-e' option. Here is a simple Makefile to add a debug target.


Update to Label Sphere

I've finally had some free time to work on the Label Sphere. The new version should correctly color the labels according to your blog's color scheme on Chrome, Firefox, and IE 8. The new version has not been added to the Blogger gallery yet, but when it does get added I will post an update. To use the new version, add a new gadget to your blog, select "Add your own" and use the following URL


I've also released the gadget under the GPL here



Run-time and design-time selection of a ViewModel using XAML

I've been working on a WPF project in Visual Studio 2010 and I came across a problem where Visual Studio would crash when I used the Document Outline while editing an XAML in the Design view. There seems to be several ways of solving this but all the methods seem to involve code either as a separate class such as a ViewModelLocator or in a code-behind using GetIsInDesignMode.

Here is a solution that uses (mostly) XAML. First, create a new ViewModel class that is a stub or mock. This class will also allow you to have some design-time data that won't crash Visual Studio. Then implement the following XAML to select between your main ViewModel and your mock ViewModel. The Blend XML Namespace ("d") is marked as Ignorable (only available during design-time) then AlternateContent is used to select the MockViewModel if the "d" namespace is available (design-time) and fallback to the MainViewModel (run-time).