Archive for the ‘Tech’ Category

Puppet Module Repository Beta

03:08 PM

Finally! Luke and I took out a minute and hashed up a scheme to get the ball rolling on a central one-stop-shop for puppet modules.

Let me quote the pertinent part from Luke’s mail:
(more…)

XCache

09:46 AM

Installed XCache a few days ago. Traded 64MB RAM for instant PHP speed goodness. Sometimes you can have your cake AND eat it. :)

subst and TortoiseSVN/TortoiseGIT status caches

12:12 PM

TortoiseSVN and TortoiseGit use the TSVNCache.exe to collect all update notifications and update the status overlay icons in one place. This provides real-time updates and improves latency when showing folders in the explorer.

On the downside, TSVNCache is easily confused by subst.exe since it’ll receive updates only for one of the locations. The TortoiseGIT documentation provides this work-around:

[...] exclude the original path from showing overlays, so that the overlays show up on the subst path instead.

We use subst to have a default “project drive” located at P:, therefore I disabled updates for all drive types and only set the “Included Paths” option to “P:\”.

Attaching Events to ListViewItems in WPF

01:13 PM

I was looking for a way to attach a MouseDoubleClickHandler to the implicitly generated ListViewItems in a databound control:


<listview ItemsSource="{Binding Instances}" />

For some strange reason all the mouse events seem to be directly routed instead of bubbling like other input events. Only some magic of the framework causes them to be raised for every hit control. This causes the sender to be totally worthless, since it is always the “current” object.

(more…)

What is puppet?

03:15 PM

Puppet is an application to automate the configuration of UNIX systems. The puppet master defines the intended system state (packages, files, services, etc) on a central server. On the managed installations an agent regularly fetches the manifest and applies it to the system. The agent sends information (like hostname or IP address) from the system to the server. This can be used to parametrise the configuration.

(more…)

Migrating User Profiles and Outlook

01:07 PM

I’ve joined my computer to a Domain. Therefore I migrated my User Profile (under Computer -> Properties -> Advanced System Settings -> User Profiles). It… let’s say: worked.

But I couldn’t save attachments in Outlook.

Can’t create file: Right-click the folder you want to create the file in, and then click Properties on the shortcut menu to check your permissions for the folder

The problem is, that Outlook saves a path to a “OutlookSecureTempFolder” in the registry. This path pointed to my old profile where my new user has no right to write to. I changed the path to my new profile path, restarted Outlook and it worked.

Source: http://msmvps.com/blogs/steveb/archive/2007/08/24/can-t-open-or-save-an-attachment-in-outlook-2003.aspx

C++ templates for Fun and Profit

11:36 AM

Wijaa asks on stackoverflow: What’s the most brilliant use of templates you’ve ever encountered?

Reading the linked articles gave me much joy. Here are some highlights:
(more…)

ASP.NET Intellisense in Visual Studio 2008

01:31 PM

Since yesterday I had no intellisense for standard ASP.NET Server Controls. Today I found a solution:

http://forums.asp.net/t/1205528.aspx

Quoting from the blog of Mikhail Arkipov (and the same goes for VS 2008)

I blogged earlier that in VS 2005 we switched from using static XML schemas to automatically generating them using reflection on Web controls. XML schemas are generated on demand as you open pages in your Web site. They contain information about ASP.NET controls, custom and user controls. You can find generated files cache in

C:\Documents and Settings\[Username]\Application Data\Microsoft\VisualStudio\8.0\ReflectedSchemas

For Vista:

C:\Users\[Username]\AppData\Roaming\Microsoft\VisualStudio\9.0\ReflectedSchemas

XmlSerializer and Nullable<T>. A recipe.

02:45 PM

When I tried to serialize a class with an Double? property as attribute, XMLSerializer died with its usual and oh-so-unhelpful cascade of InvalidOperationExceptions. The actual error message was:

Cannot serialize member ‘SomeValue’ of type System.Nullable`1[System.Double]. XmlAttribute/XmlText cannot be used to encode complex types.

Since XML attributes have very well-defined null semantics, I was pretty stumped, but soon I found the Allow override for XmlSerializer Nullable<T> attribute behavior feature request on Microsoft Connect:

Unfortunately, this change would be too large to take and would be a new feature rather than a bug fix. We are trying to minimize new feature work in the XmlSerializer, partly to reduce regression risk, and focus our effort on the next-generation serialization technology. Unfortunately, we have decided to resolve this as Won’t Fix.

So I went back the the trusty old *Specified property of XmlSerializer and hacked together a micro-pattern to support Nullable<T> for serialization to an XML attribute:

(more…)

A quick sketch of asynchronous View Models

01:13 PM

The How to make a loading graphic in WPF XAML? question on stackoverflow reminded me, that I wanted to write a short piece about the WPF infrastructure I’m currently writing. A first part was the Doing GUI architecture the Right Way where I describe the basic advantages of the View Model. Today I’m going to show some details of how this enables very smooth removal of background tasks from the UI Thread. Beware that this is work in progress, so edges might be rough.

The basic structure is three-fold: the Model where the actual data resides, the View which interacts with the user and the View Model as a intermediate layer. I will start out with describing the View, which is really thin. Afterwards I’ll talk a bit why the Model alone is not enough. In the last part I’ll describe my approach to filling the gap.

(more…)