This file contains hidden or 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( | |
$buildFile = (join-path (Split-Path -parent $MyInvocation.MyCommand.Definition) "build.msbuild"), | |
$buildParams = "/p:Configuration=Release", | |
$buildTarget = "/t:Default" | |
) | |
& "${env:ProgramFiles(x86)}\MSBuild\14.0\Bin\MSBuild.exe" $buildFile $buildParams $buildTarget /verbosity:diagnostic |
This file contains hidden or 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
"dependencies": { | |
"kloggy-domain": "", | |
"kestrel": "1.0.0-*", | |
"aspnet-diagnostics": "1.0.0-*", | |
"aspnet-staticfiles": "1.0.0-*", | |
"aspnet-mvc": "6.0.0-*", | |
"aspnet-http": "1.0.0-*", | |
"aspnet-hosting": "1.0.0-*", | |
"weblistener": "1.0.0-*", | |
"ms-config": "1.0.0-*", |
This file contains hidden or 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
pulic class Singleton | |
{ | |
private static readonly object _mutex = new object(); | |
private static Singleton _instance; | |
private Singleton() | |
{ | |
} | |
public static Singleton Instance |
This file contains hidden or 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.Collections.Generic; | |
using System.Security.Claims; | |
namespace MultipleClaimsSample | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
// NOTE: The below is a sample of how we may construct a ClaimsPrincipal instance over two ClaimsIdentity instances: |
This file contains hidden or 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
powershell -NoProfile -ExecutionPolicy unrestricted -windowstyle hidden -Command "cd 'c:\dev';dir" |
This file contains hidden or 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
{ | |
"took": 2, | |
"timed_out": false, | |
"_shards": { | |
"total": 5, | |
"successful": 5, | |
"failed": 0 | |
}, | |
"hits": { | |
"total": 3, |
This file contains hidden or 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
public static class ClaimsIdentityExtensions | |
{ | |
public static string GetUserEmail(this ClaimsIdentity identity) | |
{ | |
Claim emailClaim = identity.Claims.FirstOrDefault(claim => claim.Type == ClaimTypes.Email); | |
return emailClaim != null | |
? emailClaim.Value | |
: null; | |
} |
This file contains hidden or 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.Collections.Generic; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Converters; | |
using System.Runtime.Serialization; | |
namespace ConsoleApplication11 | |
{ | |
[DataContract] | |
public enum JsonPatchOperationType |
This file contains hidden or 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
const string num = "648634"; | |
if (num.All(ch => char.IsDigit(ch))) | |
{ | |
int parsedVal = 0; | |
for (var i = 0; i < num.Length; i++) | |
{ | |
int foo = 10 ^ (num.Length - i); | |
// ?? | |
} | |
} |
This file contains hidden or 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
GET http://localhost:25135/api/cars HTTP/1.1 | |
User-Agent: Fiddler | |
Accept: application/json | |
Host: localhost:25135 | |
HTTP/1.1 200 OK | |
Content-Type: application/json; charset=utf-8 | |
Date: Wed, 25 Jun 2014 12:36:48 GMT | |
Content-Length: 68 |