2017-05-05

Access to git using ssh from windows powershell


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

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

    the last statement will ask you for your passphrase

2015-12-29

Finaly Livewriter again

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

2015-07-15

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

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

2015-04-24

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}

2009-12-09

Ignore whitespace in TFS compare

http://adventuresinsoftware.com/blog/?p=330

image

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

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

2009-07-15

Timelock

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.

2009-07-08

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.amung.us?

whos online

Ralf"s shared items