This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var query = PerformanceCounterCategory | |
.GetCategories() | |
.SelectMany (category => | |
category.GetInstanceNames() | |
.DefaultIfEmpty(string.Empty) | |
.SelectMany (name => category.GetCounters(name))) | |
.Select (counter => { | |
var name = String.IsNullOrEmpty(counter.InstanceName)? string.Empty: "\\(" + counter.InstanceName + ")"; | |
return "\\" + counter.CategoryName + name + "\\" + counter.CounterName; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace PipeTransportSample | |
{ | |
using System; | |
using System.ServiceModel; | |
using System.ServiceModel.Channels; | |
using System.Threading.Tasks; | |
using Newtonsoft.Json; | |
class Program | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<runtime> | |
<gcServer enabled="true"/> | |
</runtime> | |
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "hashicorp/precise64" | |
config.vm.network :forwarded_port, guest: 443, host: 8443 | |
config.vm.network :forwarded_port, guest: 8125, host: 8125, protocol: 'tcp' | |
config.vm.network :forwarded_port, guest: 8125, host: 8125, protocol: 'udp' | |
config.vm.network :forwarded_port, guest: 2003, host: 22003 | |
config.vm.network :forwarded_port, guest: 2004, host: 22004 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log -n10 --pretty=format:"%h %s (%an)" | |
git revert HEAD~2..HEAD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param( | |
[Parameter(Mandatory=$true)] | |
[string]$vmname | |
) | |
$ipAddresses = Get-VM -name $vmname | Select -ExpandProperty networkadapters | select IPAddresses | |
while ($ipAddresses.IPAddresses.Count -eq 0) | |
{ | |
Write-Host "Waiting for VM to be ready" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Net.Http; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace TestDistinch | |
{ | |
static class TimeBoxTaskExtensions | |
{ | |
public const int DefaultTimeoutMilliseconds = 200; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prlctl start trusty64 | |
prlctl exec trusty64 ifconfig | grep inet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################### | |
# Set default behavior to automatically normalize line endings. | |
############################################################################### | |
* text=auto | |
############################################################################### | |
# Set default behavior for command prompt diff. | |
# | |
# This is need for earlier builds of msysgit that does not have it on by | |
# default for csharp files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo Stopping redis containers.. | |
docker ps -a | grep redis | |
docker ps -a | grep redis | awk '{print $1}' | xargs --no-run-if-empty -n1 docker stop | xargs --no-run-if-empty -n1 docker rm | |
OlderNewer