Skip to content

Instantly share code, notes, and snippets.

View memark's full-sized avatar
Need help on your Rust project?

Magnus Markling memark

Need help on your Rust project?
View GitHub Profile
memark / Program.cs
Last active December 18, 2021 11:00
using System.Text.RegularExpressions;
using Amazon.Route53;
using Amazon.Route53.Model;
var route53AccessKey = Environment.GetEnvironmentVariable("...");
var route53SecretKey = Environment.GetEnvironmentVariable("...");
var route53ZoneId = Environment.GetEnvironmentVariable("...");
var meeowNowAddressPattern = Environment.GetEnvironmentVariable("...")!;
var client = new AmazonRoute53Client();
memark /
Last active September 27, 2020 18:30
iso format timestamp python
import logging
logger = logging.getLogger()
ch = logging.StreamHandler()
formatter = logging.Formatter(fmt='%(asctime)s.%(msecs)03dZ - %(msg)s', datefmt='%Y-%m-%dT%H:%M:%S')
logger.warning("some message")
private static void RegisterBusinessLogicStubs(ContainerBuilder containerBuilder)
var tempContainer = CreateBusinessLogicAutofacModuleContainer();
var interfaceToStubList = GetInterfaceTypeList(tempContainer);
var stubList = interfaceToStubList.Select(x => Substitute.For(new[] { x }, new object[] { }));
foreach (var s in stubList)
private static void RegisterBusinessLogicStubs(ContainerBuilder containerBuilder)
var tempContainerBuilder = new ContainerBuilder();
var module = BusinessLogicAutofacModule.CreateWithoutDatabaseDefaults(default, default, default, default, default, default, default, default);
var tempContainer = tempContainerBuilder.Build();
var interfaceToStubList = tempContainer.ComponentRegistry.Registrations
.SelectMany(x => x.Services)
namespace Jwc.MoqExtensions
using Moq;
using System;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using Xunit;
public interface IFoo