Access to git using ssh from windows powershell

Change your passphrase, so it can actually be entered on the command line
- open private key
- change passphrase
- export as OpenSSH key

Import-Module posh-git
Start-SshAgent -Quiet
add-sshkey "C:\Users\....ppk"

    the last statement will ask you for your passphrase


Finaly Livewriter again

The first post with the new Version of Open Live Writer.


Forcing Excel to use a csv field separator other than the local list separator

Add the line
at the beginning of the csv-file, to instruct excel to use the pipe character as the field separator.


Starting Azure VM via PowerShell Jobs

The tricky part is how to pass the parameters to the Start-AzureVM cmdlet.

This code assumes the name of the vm is equal to the name of the ServiceName (the name of the Cloud Service)

$vms = Get-AzureVM
$vms | % {Start-Job {Start-AzureVM -Name $args[0] -ServiceName $args[0]} -ArgumentList $_.Name}


Ignore whitespace in TFS compare



Command: C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\diffmerge.exe

Arguments: %1 %2 %6 %7 %5 /ignorespace



IanG on Tap: Oh No! Not the TimedLock Again!: "Oh No! Not the TimedLock Again!"

This code shows how to do locks with timeouts and a way to check if someone forgot to call Dispose on a IDisposable struct.


C# Object Initializers. More than meets the eye

Up till today I liked C# object initializers because the looked nicer and when using parameter objects they even turn into something like named parameters.

But just a couple of minutes ago I was changing some test data creation code that didn't use object initializers but plain property assignments.

As I use ReSharper I alt-returned the assignments into an initializer. What struck me was that not all property assignments where put into the initializer.

Why? Because the same property had two assignments (of course with different values). I only noticed that when I was trying to incorporate the assignment into the initializer and the red squiglies from ReSharper. The C# compiler issues an error when you try to compile this type of code:
error CS1912: Duplicate initialization of member 'X'
So object initializers not only look better, they prevent you from making such a dumb mistake.


whos online

Ralf"s shared items