Skip to content

Instantly share code, notes, and snippets.

Avatar
🌞
building

Reuben Bond ReubenBond

🌞
building
View GitHub Profile
View dactyl_manuform_5x7_via_rabdo.json
{
"name": "Dactyl Manuform (5x7)",
"vendorProductId": 1145910583,
"macros": [
"{KC_LCTL,KC_LEFT}",
"{KC_LCTL,KC_DOWN}",
"{KC_LCTL,KC_UP}",
"{KC_LCTL,KC_RGHT}",
"",
"",
@ReubenBond
ReubenBond / HostedServiceCommunicationListener.cs
Last active December 1, 2022 21:10
Service Fabric IHostBuilder integration
View HostedServiceCommunicationListener.cs
namespace YOUR_NAMESPACE
{
using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Hosting;
using Microsoft.ServiceFabric.Services.Communication.Runtime;
/// <summary>
/// Service Fabric <see cref="ICommunicationListener"/> which integrates with an <see cref="IHost"/> instance.
@ReubenBond
ReubenBond / ObserverWithReturn.csproj
Created March 20, 2022 19:36
Orleans grain observer (IGrainObserver) which returns results
View ObserverWithReturn.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>ObserverWithReturn</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
View jitdisasm.txt
Ready
****** START compiling Hagar.Buffers.Reader`1[ReadOnlySequence`1][System.Buffers.ReadOnlySequence`1[System.Byte]]:ReadByte():ubyte:this (MethodHash=011f4f14)
Generating code for Windows x64
OPTIONS: compCodeOpt = BLENDED_CODE
OPTIONS: compDbgCode = true
OPTIONS: compDbgInfo = true
OPTIONS: compDbgEnC = false
OPTIONS: compProcedureSplitting = false
OPTIONS: compProcedureSplittingEH = false
IL to import:
View HttpClientRecommendations.md

Recommendations:

@ReubenBond
ReubenBond / killall.ps1
Last active May 20, 2020 18:33
killall cmd for PowerShell with completion
View killall.ps1
# In a PS terminal, type "code $profile" and put this in there
function killall {
param(
[ArgumentCompleter(
{
param($cmd, $param, $values)
get-process |
? { $_.Name.StartsWith($values, [StringComparison]::OrdinalIgnoreCase) } |
@ReubenBond
ReubenBond / Program.cs
Last active May 5, 2020 18:29
StallDumper - dump Windows process memory when it stops emitting ETW events for a given provider for too long
View Program.cs
using Microsoft.Diagnostics.Tracing;
using Microsoft.Diagnostics.Tracing.Session;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
@ReubenBond
ReubenBond / RuntimeTypeNameFormatter.cs
Created April 30, 2020 13:50
CLR Type Parser/Formatter
View RuntimeTypeNameFormatter.cs
using System;
using System.Collections.Concurrent;
using System.Reflection;
using System.Text;
namespace gentest
{
/// <summary>
/// Utility methods for formatting <see cref="Type"/> instances in a way which can be parsed by
/// <see cref="Type.GetType(string)"/>.
@ReubenBond
ReubenBond / Program.cs
Last active January 16, 2020 03:19
Orleans localhost demo
View Program.cs
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Orleans;
using Orleans.Hosting;
using System;
using System.Threading;
using System.Threading.Tasks;
View AddShutdownTask.cs
using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Orleans.Runtime;
namespace Orleans.Hosting
{