Running 30s test @ http://localhost:8080/api/values/5
12 threads and 50 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 1.34ms 371.95us 18.71ms 96.25%
Req/Sec 3.00k 212.61 5.64k 83.34%
Latency Distribution
50% 1.30ms
75% 1.39ms
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 class Sorting | |
{ | |
public string FieldName { get; set; } | |
public SortDirection SortDirection { get; set; } | |
public override string ToString() => $"{FieldName} {SortDirection}"; | |
} | |
public enum SortDirection |
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
// Courtesy of https://github.com/IdentityServer/IdentityServer4/blob/18897890ce2cb020a71b836db030f3ed1ae57882/src/IdentityServer4/src/Endpoints/DiscoveryEndpoint.cs | |
// This slightly adjusts the original implementation to play nicely behind an application gateway so it checks if we have an X-original-host header and uses that as our baseUrl | |
internal class DiscoveryEndpointHandler : IEndpointHandler | |
{ | |
private readonly ILogger _logger; | |
private readonly IdentityServerOptions _options; | |
private readonly IDiscoveryResponseGenerator _responseGenerator; |
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
az webapp config ssl list -g tg-ts-prod -o tsv --query "[?contains(issuer, 'Let') && contains(expirationDate, '2019')].[thumbprint]" | wsl awk '{print "call az webapp config ssl delete -g tg-ts-prod --certificate-thumbprint "$1}' > run.cmd && run.cmd |
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
git config --global alias.unstage 'reset HEAD --' | |
git config --global alias.co checkout | |
git config --global alias.br branch | |
git config --global alias.mem '!git fetch origin main; git merge origin/main' | |
git config --global alias.rem '!git fetch origin main; git rebase origin/main' | |
git config --global alias.ci commit | |
git config --global alias.st status | |
git config --global alias.purge '!git fetch -p && git branch -vv | awk '"'"'/: gone]/{print $1}'"'"' | xargs git branch -d' | |
git config --global alias.cleanup '!git branch --merged | grep -v '"'"'\*\|master\|develop|main'"'"' | xargs -n 1 -r git branch -d' | |
git config --global alias.lc 'log -1 HEAD' |
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
void Main() | |
{ | |
BenchmarkRunner.Run<TypeBenchmark>(); | |
BenchmarkRunner.Run<FieldsBenchmark>(); | |
BenchmarkRunner.Run<PropertiesBenchmark>(); | |
BenchmarkRunner.Run<MethodsBenchmark>(); | |
} | |
// Define other methods and classes here | |
[MemoryDiagnoser] |
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
// Open Fiddler and Choose "Rules" menu, click "Customize Rules..." and add this code to CustomRule.js | |
class Handlers | |
{ | |
// .... | |
public static RulesOption("Hide CSS") | |
BindPref("fiddlerscript.rules.HideCSS") | |
var m_HideCSS: boolean = false; | |
// .... | |
static function OnBeforeResponse(oSession: Session) { |
You don't have to delete your local branch.
Simply delete your remote tracking branch:
git branch -d -r origin/<remote branch name>
(This will not delete the branch on the remote repo!)
See "Having a hard time understanding git-fetch"
there's no such concept of local tracking branches, only remote tracking branches.
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
[Authorize, HttpPost, Route("~/connect/authorize/accept"), ValidateAntiForgeryToken] | |
public async Task<ActionResult> Accept(CancellationToken cancellationToken) | |
{ | |
// Extract the authorization request from the cache, the query string or the request form. | |
var request = OwinContext.GetOpenIdConnectRequest(); | |
if (request == null) | |
{ | |
return View("Error", new OpenIdConnectMessage | |
{ | |
Error = "invalid_request", |
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 class AuthorizationController : Controller | |
{ | |
[AcceptVerbs(HttpVerbs.Get | HttpVerbs.Post)] | |
[Route("~/connect/authorize")] | |
public async Task<ActionResult> Authorize(CancellationToken cancellationToken) | |
{ | |
// Note: when a fatal error occurs during the request processing, an OpenID Connect response | |
// is prematurely forged and added to the OWIN context by OpenIdConnectServerHandler. | |
// In this case, the OpenID Connect request is null and cannot be used. | |
// When the user agent can be safely redirected to the client application, |
NewerOlder