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-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions | |
Enable-RemoteDesktop | |
cinst sublimetext2 | |
cinst dotpeek |
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.Runtime.ExceptionServices; | |
using System.Threading.Tasks; | |
namespace AsynWrapper | |
{ | |
public class TryWithAwaitInCatchExcpetionHandleResult<TResult> | |
{ | |
public bool RethrowException { get; set; } | |
public TResult DefaultResult { get; set; } |
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.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Http; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Web.Http; | |
using Newtonsoft.Json; |
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
public static class IdentityTokenHelper | |
{ | |
public const string WellKnown_VerifyAccountEmailAction = "b3d17698-011b-4a74-aa0d-1301e01bbb8f"; | |
public const string WellKnown_NortonAction = "norton::action"; | |
public const string ValidIssuer = "Norton"; | |
public static ClaimsPrincipal ValidateJWT(string tokenString,TokenValidationParameters tokenValidationParameters, out SecurityToken validatedToken) | |
{ | |
var tokenHandler = new JwtSecurityTokenHandler(); | |
var principal = tokenHandler.ValidateToken(tokenString, tokenValidationParameters, out validatedToken); |
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
<simple-table> | |
<table class="highlight"> | |
<thead> | |
<tr> | |
<h5>{title}</h5> | |
<th each={ name, i in cols }>{name}</th> | |
</tr> | |
</thead> | |
<tbody> |
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.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Net; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.IO.Compression; | |
using System.Threading; | |
using MaxMind.GeoIP2; |
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
// https://github.com/graphql-dotnet/graphql-dotnet | |
public static class GraphQLStarWarsExtension | |
{ | |
public static void RegisterGraphQLTypes(this ContainerBuilder builder) | |
{ | |
builder.RegisterInstance(new DocumentExecuter()).As<IDocumentExecuter>(); | |
builder.RegisterInstance(new DocumentWriter()).As<IDocumentWriter>(); | |
builder.RegisterInstance(new StarWarsData()).As<StarWarsData>(); |
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
public class PublicRefreshTokenExtensionGrantValidator : IExtensionGrantValidator | |
{ | |
internal class ResultDto | |
{ | |
public string access_token { get; set; } | |
public int expires_in { get; set; } | |
public string token_type { get; set; } | |
public string refresh_token { get; set; } | |
} |
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.Dynamic; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Converters; | |
namespace Hello | |
{ | |
public static class ExpandoObjectExtensions | |
{ | |
public static ExpandoObject Clone(this ExpandoObject original) | |
{ |
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
1. Add | |
g.addV('template').property('id', '061430dc-a267-4140-964d-a046470c9273').property('category','cat1').property('version','1.0.0') | |
g.addV('cct').property('id', '762d3cc4-2447-46d3-aa6d-ad3bc17444b6').property('category','cctCat1').property('version','1.0.0') | |
g.addV('colp').property('id', '067a6bb2-19da-4d6c-af46-b66473b04c35').property('category','colpCat1').property('version','1.0.0') | |
2. Find by id | |
g.V('061430dc-a267-4140-964d-a046470c9273') | |
3. add a new property |
OlderNewer