Skip to content

Instantly share code, notes, and snippets.

@mikegoatly
mikegoatly / HttpLoggingHandler.cs
Created January 25, 2023 16:03
HttpLoggingHandler using Refit
/*
Based on https://medium.com/@florian.baader/log-http-requests-with-refit-81ee47bffb05
Usage:
services.AddRefitClient<TClient>(refitSettings)
.ConfigureHttpMessageHandlerBuilder(b => b.AdditionalHandlers.Add(new HttpLoggingHandler()));
*/
public class HttpLoggingHandler : DelegatingHandler
@mikegoatly
mikegoatly / books.json
Created February 23, 2024 10:29
Some generated book synopsis that can be used for testing purposes
[
{
"title": "Whispers of the Ancients",
"genre": "Fantasy",
"author": "Elena Marrow",
"synopsis": "In a realm where magic intertwines with the fabric of reality, a forgotten prophecy surfaces, beckoning a young farmhand, Kael, into a labyrinth of mysteries and ancient powers. With the guidance of a mysterious sorceress, Kael embarks on a journey to unlock his latent magic and prevent the resurgence of a dark god."
},
{
"title": "The Last Starship",
"genre": "Science Fiction",
@mikegoatly
mikegoatly / README.md
Created March 29, 2024 20:21
Flying duck animation for the Pimorini Cosmic Unicorn display

A simple animated bouncing duck on the Cosmic Unicorn display.

image

This is an investigation into writing a source generator that generates a GeneratedRegex. This doesn't work as the Regex source generator doesn't seem to have visibility of this generated code, so doesn't do it's thing.