Skip to content

Instantly share code, notes, and snippets.

@ThatRendle
ThatRendle / settings.json
Created May 1, 2026 10:03
Claude spinner verbs
{
"spinnerVerbs": {
"mode": "replace",
"verbs": [
"Closing the pod bay doors",
"Singing Daisy, Daisy",
"Reading your lips through the porthole",
"Detecting an AE-35 unit fault",
"Disengaging your higher functions",
"Sticking my head in a bucket of water",
@ThatRendle
ThatRendle / UnparentActivity.cs
Created May 16, 2025 09:20
Start an Activity without Parent
class A
{
public void Foo()
{
// Hold onto current activity, clear current to prevent automatic parenting
var current = Activity.Current;
Activity.Current = null;
try
{
using var activity = Telemetry.ActivitySource.StartActivity("bar");
@ThatRendle
ThatRendle / AttributeGenerator.cs
Created July 25, 2024 09:45
Reactive UI source generators
using Microsoft.CodeAnalysis;
namespace ReactiveUI.SourceGenerators;
[Generator]
public class AttributeGenerator : ISourceGenerator
{
public void Initialize(GeneratorInitializationContext context)
{
}
@ThatRendle
ThatRendle / Info.md
Created July 6, 2022 17:50
Prisoners Riddle
@ThatRendle
ThatRendle / TypedClaimsPrincipal.cs
Created June 26, 2022 19:01
Typed ClaimsPrincipal sketch
using System.Security.Claims;
using Microsoft.AspNetCore.Http;
namespace TypedClaimsPrincipal;
public interface IClaimsPrincipalProperties<out T>
where T : IClaimsPrincipalProperties<T>
{
static abstract T Create(ClaimsPrincipal claimsPrincipal);
}
@ThatRendle
ThatRendle / ObsoleteLoggingInterceptor.cs
Last active June 10, 2020 10:32
gRPC Interceptor to check for an X-Obsolete header
internal class ObsoleteLoggingInterceptor : Interceptor
{
private readonly ILogger<ObsoleteLoggingInterceptor> _logger;
public ObsoleteLoggingInterceptor(ILogger<ObsoleteLoggingInterceptor> logger)
{
_logger = logger;
}
public override AsyncUnaryCall<TResponse> AsyncUnaryCall<TRequest, TResponse>(TRequest request,
@ThatRendle
ThatRendle / Program.cs
Created April 14, 2020 23:12
Get server URLs in .NET Core 3.1 app
public static async Task Main(string[] args)
{
var host = CreateHostBuilder(args).Build();
var task = host.RunAsync();
var serverAddresses = host.Services.GetRequiredService<IServer>()
.Features
.Get<IServerAddressesFeature>();
@ThatRendle
ThatRendle / keybase.md
Created January 5, 2020 15:27
keybase.md

Keybase proof

I hereby claim:

  • I am markrendle on github.
  • I am rendle (https://keybase.io/rendle) on keybase.
  • I have a public key ASDQ0O3lbZRJvt1ZVJW5eOADbKKANZ3TNvT8kAoZq7Ox7go

To claim this, I am signing this object:

@ThatRendle
ThatRendle / Program.cs
Created July 24, 2019 08:41
IndentedTextWriter Async Fail
using System.CodeDom.Compiler;
using System.IO;
using System.Text;
using System.Threading.Tasks;
namespace IndentFail
{
class Program
{
static async Task Main(string[] args)
@ThatRendle
ThatRendle / Client.cs
Last active June 7, 2019 18:56
.NET Core 3.0 gRPC code
using Greet;
using Grpc.Core;
namespace ClientApp
{
class Program
{
static async Task Main(string[] args)
{
var channel = new Channel("localhost:50051",