Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
Shipping!

Aaron Stannard Aaronontheweb

🚀
Shipping!
View GitHub Profile
@Aaronontheweb
Aaronontheweb / dotnet-monitor-grafana.json
Last active November 1, 2022 15:06
dotnet-monitor parameterized Prometheus dashboard for K8s
View dotnet-monitor-grafana.json
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
@Aaronontheweb
Aaronontheweb / spec.md
Last active December 26, 2022 14:51
Technical Spec Template
View spec.md

Engineering Spec

💡 Use this template to help structure new engineering projects into specifications. Make sure you attach this spec to the right project - if it’s not a flagship technology then it goes under "Other Projects"

Abstract

Problem statement - what is the nature of the issue we’re going to try to solve with this specification?

@Aaronontheweb
Aaronontheweb / lesson3-integration-with-actors.ipynb
Created August 26, 2021 21:56
Background code .NET interactive notebook
View lesson3-integration-with-actors.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Aaronontheweb
Aaronontheweb / config.hocon
Created August 24, 2021 21:01
Multi-journal Akka.Persistence configuration
View config.hocon
akka.persistence{
journal {
plugin = "akka.persistence.journal.sql-server"
sql-server {
# qualified type name of the SQL Server persistence journal actor
class = "Akka.Persistence.SqlServer.Journal.SqlServerJournal, Akka.Persistence.SqlServer"
# connection string used for database access
connection-string = "str1"
@Aaronontheweb
Aaronontheweb / lmdb-14.0-packages.md
Created August 7, 2021 03:05
Lightning.NET Debugging
View lmdb-14.0-packages.md
Directory: 
D:\Repositories\olympus\akka.net\src\contrib\cluster\Akka.DistributedData.Tests.MultiNode\bin\Release\net471

Mode LastWriteTime Length Name


d----- 8/6/2021 9:35 PM cs
d----- 8/6/2021 9:35 PM de

@Aaronontheweb
Aaronontheweb / cluster-tail.ps1
Created June 9, 2021 16:58
Petabridge.Cmd with live-tailing commands with timestamps
View cluster-tail.ps1
pbm cluster tail | foreach{ Write-Output "[$(Get-Date)] $_" } > cluster-tail.txt
@Aaronontheweb
Aaronontheweb / base64encode.linq
Last active May 29, 2021 17:13
Base64 Encoding with Span<T>
View base64encode.linq
void Main()
{
/*
Input: [0], Output: [A] (length=1)
Input: [1], Output: [B] (length=1)
Input: [18446744073709551615], Output: [~~~~~~~~~~P] (length=11)
Input: [0], Output: [A] (length=1)
Input: [34343], Output: [nYI] (length=3)
*/
@Aaronontheweb
Aaronontheweb / UriParse.linq
Created May 27, 2021 18:15
Akka ActorPath Parsing
View UriParse.linq
public static class Program
{
public static void Main()
{
/*
* Experimenting with manual Uri parsing in C# for fun and performance
* Akka.NET custom Address parsing
*
* ex: akka.tcp://CustomerSys@localhost:9110/user/foo/bar/baz
*
@Aaronontheweb
Aaronontheweb / SpanHacks.cs
Last active June 2, 2021 16:46
Span<T> Hacks
View SpanHacks.cs
/// <summary>
/// INTERNAL API.
///
/// <see cref="Span{T}"/> polyfills that should be deleted once we drop .NET Standard 2.0 support.
/// </summary>
internal static class SpanHacks
{
public static bool IsNumeric(char x)
{
return (x >= '0' && x <= '9');
@Aaronontheweb
Aaronontheweb / Startup.cs
Created May 14, 2021 18:04
Azure Functions Debugging
View Startup.cs
.ConfigureHostConfiguration(configHost =>
{
configHost.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json")
.AddEnvironmentVariables();
})