Skip to content

Instantly share code, notes, and snippets.

View rocgao's full-sized avatar

Peng Gao rocgao

View GitHub Profile
Write-Host "Current directory is $PWD"
$procdumpFile="procdump.exe"
if(Test-Path $procdumpFile)
{
Write-Host "The procdump.exe file exists."
}
else
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>csc</id>
<version>2.0.0-rc3-61215-08</version>
<authors>Roc</authors>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>csc</description>
<dependencies>
<group targetFramework=".NETStandard 1.0">
@rocgao
rocgao / CreatingDynamicMethodWithExpression.cs
Created December 2, 2016 02:22
使用Expression Tree动态创建Generic Method
/**
* 方法原型
* Task<string> CreateCompletedTaskWithException(Exception ex)
{
var tcs = new TaskCompletionSource<string>();
tcs.SetException(ex);
var result = tcs.Task;
return result;
}
*
@rocgao
rocgao / MurMurHash3.cs
Created January 21, 2016 06:49 — forked from automatonic/MurMurHash3.cs
MurMurHash3 .Net (C#) implementation
/*
This code is public domain.
The MurmurHash3 algorithm was created by Austin Appleby and put into the public domain. See http://code.google.com/p/smhasher/
This C# variant was authored by
Elliott B. Edwards and was placed into the public domain as a gist
Status...Working on verification (Test Suite)
Set up to run as a LinqPad (linqpad.net) script (thus the ".Dump()" call)
*/