Skip to content

Instantly share code, notes, and snippets.

View ReubenBond's full-sized avatar
🧊

Reuben Bond ReubenBond

🧊
View GitHub Profile
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:

Recommendations:

@ReubenBond
ReubenBond / killall.ps1
Last active May 20, 2020 18:33
killall cmd for PowerShell with completion
# 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
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
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
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;
using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Orleans.Runtime;
namespace Orleans.Hosting
{
using System;
using System.Diagnostics;
namespace Orleans.Runtime
{
/// <summary>
/// Non-allocating stopwatch for timing durations.
/// </summary>
internal struct ValueStopwatch
{
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Orleans;
using Orleans.ApplicationParts;
using Orleans.Configuration;
using System;
using System.Linq;
using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json;
using Orleans;
using Orleans.Runtime;
using Orleans.Serialization;
namespace Tester
{