Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Net;
using System.Net.Sockets;
using System.Net.NetworkInformation;
namespace GetFQDN
{
internal class Program
{
static void Main(string[] args)
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/uio.h>
#include <unistd.h>
#include <fcntl.h>
#define HAVE_STDINT_H 1
#define ENABLE_ZENTIMER 1
@jstedfast
jstedfast / benchmarks.md
Last active September 8, 2021 04:20
MimeParser vs ExperimentalMimeParser vs MimeReader Benchmark Results
BenchmarkDotNet=v0.13.1, OS=Windows 10.0.19043.1165 (21H1/May2021Update)
Intel Core i7-9700 CPU 3.00GHz, 1 CPU, 8 logical and 8 physical cores
.NET SDK=5.0.400
  [Host]     : .NET 5.0.9 (5.0.921.35908), X64 RyuJIT  [AttachedDebugger]
  DefaultJob : .NET 5.0.9 (5.0.921.35908), X64 RyuJIT

|                                             Method |      Mean |    Error |   StdDev |
|--------------------------------------------------- |----------:|---------:|---------:|
|                         MimeParser_StarTrekMessage | 232.25 ms | 1.043 ms | 0.925 ms |
using System;
using System.Net.Security;
using System.Collections.Generic;
using System.Security.Cryptography.X509Certificates;
using MailKit;
using MailKit.Net.Imap;
using MailKit.Net.Pop3;
using MailKit.Net.Smtp;
using MailKit.Security;
//
// DbDataReaderExtensions.cs
//
// Author: Jeffrey Stedfast <jeff@xamarin.com>
//
// Copyright (c) 2020 Jeffrey Stedfast
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
//
// DbConnectionExtensions.cs
//
// Author: Jeffrey Stedfast <jeff@xamarin.com>
//
// Copyright (c) 2020 Jeffrey Stedfast
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
//
// MessageCache.cs
//
// Author: Jeffrey Stedfast <jeff@xamarin.com>
//
// Copyright (c) 2020 Jeffrey Stedfast
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
#!/bin/sh
# Create the private key for the root (CA) certificate
if [ ! -e "certificate-authority.key" ]; then
openssl genrsa -out certificate-authority.key 4096 > /dev/null
fi
# Create the private key for the primary intermediate certificate
if [ ! -e "intermediate1.key" ]; then
openssl genrsa -out intermediate1.key 4096 > /dev/null
using System;
using System.IO;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using Org.BouncyCastle.Asn1;
using Org.BouncyCastle.Math;
using Org.BouncyCastle.Pkcs;
using Org.BouncyCastle.X509;
using System;
using System.IO;
using System.Linq;
using System.Text;
using YamlDotNet.Core;
using YamlDotNet.RepresentationModel;
namespace ArcSigningTestGenerator
{