Skip to content

Instantly share code, notes, and snippets.

View watfordgnf's full-sized avatar

Christopher Watford watfordgnf

View GitHub Profile
using System;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using JsonWebToken;
using Xunit;
namespace JwtIssues
{
@watfordgnf
watfordgnf / DockerTest.md
Last active May 17, 2019 15:40
NATS TLS Test from Win2k12 on .NET Framework 4.7.2

Created a self signed cert for the test:

$  openssl req -newkey rsa:4096 -nodes -sha512 -x509 -days 3650 -nodes -out nats.pem -keyout nats-priv.pem
...
$ ls *.pem
nats.pem  nats-priv.pem

Ran a docker container with NATS on linux:

@watfordgnf
watfordgnf / TracingCommandInterceptor.cs
Created April 16, 2019 15:26
TracingCommandInterceptor: Entity Framework "tracing" with call stack injection into SQL commands
using System;
using System.Data.Common;
using System.Data.Entity;
using System.Data.Entity.Infrastructure.Interception;
using System.Diagnostics;
using System.Reflection;
using System.Text;
namespace TracingInterception
{
@watfordgnf
watfordgnf / NatsServiceCollectionExtensions.cs
Created February 27, 2019 16:12
NATS from ASP.Net Core DI
using System;
using NATS.Client;
namespace Microsoft.Extensions.DependencyInjection
{
/// <summary>
/// Provides extension methods for NATS registration with ASP.Net Core DI
/// </summary>
public static class NatsServiceCollectionExtensions