Skip to content

Instantly share code, notes, and snippets.

View asimmon's full-sized avatar

Anthony Simmon asimmon

View GitHub Profile
@asimmon
asimmon / ephemeral-mongo-example.cs
Created March 25, 2023 16:57
EphemeralMongo blog post example
var options = new MongoRunnerOptions
{
UseSingleNodeReplicaSet = true,
StandardOuputLogger = Console.WriteLine,
StandardErrorLogger = Console.WriteLine,
};
using (var runner = MongoRunner.Run(options))
{
var database = new MongoClient(runner.ConnectionString).GetDatabase("mydb");
@asimmon
asimmon / BetterPasswordHasher.cs
Last active March 9, 2025 09:40
BetterPasswordHasher
using System.Security.Cryptography;
public static class BetterPasswordHasher
{
// Always use distinct version IDs for new versions, ideally by incrementing the highest version ID.
private const byte VersionId1 = 0x01;
private const byte VersionId2 = 0x02;
private const byte DefaultVersionId = VersionId2;
@asimmon
asimmon / .env
Created February 15, 2024 04:32
Zipkin with OpenTelemetry collector
OTEL_EXPORTER_OTLP_ENDPOINT=http://127.0.0.1:4317
@asimmon
asimmon / with-replicaset.txt
Created April 2, 2025 18:10
MongoDB logs before connection available
CONTROL Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
CONTROL Multi threading initialized
NETWORK Implicit TCP FastOpen unavailable. If TCP FastOpen is required, set at least one of the related parameters
NETWORK Initialized wire specification
TENANT_M Starting TenantMigrationAccessBlockerRegistry
CONTROL MongoDB starting
CONTROL Target operating system minimum version
CONTROL Build Info
CONTROL Operating System
CONTROL Options set by command line
@asimmon
asimmon / current.json
Created April 5, 2025 21:53
downloads.mongodb.org/current.json as of 2024-04-05
{
"versions": [
{
"changes": "https://jira.mongodb.org/issues/?jql=project%20%3D%20SERVER%20AND%20fixVersion%20%3D%20%228.1.0%22%20ORDER%20BY%20status%20DESC%2C%20priority%20DESC",
"continuous_release": false,
"current": true,
"date": "03/28/2025",
"development_release": false,
"downloads": [
{