Skip to content

Instantly share code, notes, and snippets.

View jasonmitchell's full-sized avatar

Jason Mitchell jasonmitchell

View GitHub Profile
@jasonmitchell
jasonmitchell / 2113-https.yaml
Last active May 14, 2017 19:56
Gossip Request
MemDb: true
Log: ../2113-https-logs
IntIp: 127.0.0.1
ExtIp: 127.0.0.1
IntTcpPort: 1112
ExtTcpPort: 1113
IntHttpPort: 2112
ExtHttpPort: 2113
IntHttpPrefixes: https://*:2112/
ExtHttpPrefixes: https://*:2113/
@jasonmitchell
jasonmitchell / Commands.cs
Last active June 5, 2017 11:49
Event sourced handler
public class RequestReservation { }
public class ConfirmReservation { }
function Get-BasicAuthCredentials {
param (
$user = "admin",
$password = "changeit"
)
$basicAuthPair = "${user}:${password}"
$encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($basicAuthPair))
$basicAuthValue = "Basic $encodedCreds"
return $basicAuthValue
public class CreateFolder
{
public string Name { get; set; }
}
public class DeleteFolder
{
public Guid Id { get; set; }
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
Batch Size Simple Insert Execution Time (ms) Multi-Row Insert Execution Time (ms) Improvement
1 4 3 33%
10 15 4 275%
50 68 3 2167%
100 133 4 3225%
250 306 6 5000%
500 606 8 7475%
1000 1358 11 12,245%
2500 3527 28