Skip to content

Instantly share code, notes, and snippets.

View danmoseley's full-sized avatar
:shipit:

Dan Moseley danmoseley

:shipit:
  • Microsoft
  • Jackson, WY
  • 04:16 (UTC -06:00)
View GitHub Profile
C:\git\aspnetcore\src\Components\Components\src\Routing\Router.cs:95 -
C:\git\aspnetcore\src\Components\Components\src\Routing\Router.cs:74 -
C:\git\aspnetcore\src\Components\Web\src\Forms\InputFile\RemoteBrowserFileStreamOptions.cs:12 - public class RemoteBrowserFileStreamOptions
C:\git\aspnetcore\src\Components\Web\src\Web\WebEventCallbackFactoryEventArgsExtensions.cs:19 -
C:\git\aspnetcore\src\Components\Web\src\Web\WebEventCallbackFactoryEventArgsExtensions.cs:35 -
C:\git\aspnetcore\src\Components\Web\src\Web\WebEventCallbackFactoryEventArgsExtensions.cs:51 -
C:\git\aspnetcore\src\Components\Web\src\Web\WebEventCallbackFactoryEventArgsExtensions.cs:67 -
C:\git\aspnetcore\src\Components\Web\src\Web\WebEventCallbackFactoryEventArgsExtensions.cs:83 -
C:\git\aspnetcore\src\Components\Web\src\Web\WebEventCallbackFactoryEventArgsExtensions.cs:99 -
C:\git\aspnetcore\src\Components\Web\src\Web\WebEventCallbackFactoryEventArgsExtensions.cs:115 -
@danmoseley
danmoseley / triage.ps1
Last active July 22, 2025 19:22
triage query (no milestone+rc1+p7)
# GitHub Issue Label Counter for dotnet/aspnetcore
# Counts issues by label in 10.0-rc1, 10.0-preview7 milestones, or no milestone
# GitHub Personal Access Token (set this to your token)
$GitHubToken = $env:GITHUB_TOKEN
if (-not $GitHubToken) {
$GitHubToken = Read-Host "Enter your GitHub Personal Access Token" -AsSecureString
$GitHubToken = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($GitHubToken))
}
@echo off
setlocal enabledelayedexpansion
set "inputfile=combos"
for /f "usebackq delims=" %%a in ("%inputfile%") do (
rd /s/q Foo
echo ========================
md Foo
pushd Foo
echo Running: ########## %%a #############
AspNetCore.HealthChecks.Azure.Data.Tables,AspNetCore.HealthChecks.Azure.KeyVault.Secrets,AspNetCore.HealthChecks.Azure.Storage.Blobs,AspNetCore.HealthChecks.Azure.Storage.Queues,AspNetCore.HealthChecks.AzureServiceBus,AspNetCore.HealthChecks.Kafka,AspNetCore.HealthChecks.MongoDb,AspNetCore.HealthChecks.MySql,AspNetCore.HealthChecks.NpgSql,AspNetCore.HealthChecks.Rabbitmq,AspNetCore.HealthChecks.Redis,AspNetCore.HealthChecks.SqlServer,AWS.Messaging,AWSSDK.CloudFormation,AWSSDK.Core,AWSSDK.Extensions.NETCore.Setup,AWSSDK.SimpleNotificationService,AWSSDK.SQS,Azure.AI.OpenAI,Azure.Data.Tables,Azure.Extensions.AspNetCore.Configuration.Secrets,Azure.Identity,Azure.Messaging.EventHubs.Processor,Azure.Messaging.ServiceBus,Azure.Messaging.WebPubSub,Azure.Provisioning,Azure.Provisioning.AppConfiguration,Azure.Provisioning.ApplicationInsights,Azure.Provisioning.CognitiveServices,Azure.Provisioning.CosmosDB,Azure.Provisioning.EventHubs,Azure.Provisioning.KeyVault,Azure.Provisioning.OperationalInsights,Azure.Provisioning.
@danmoseley
danmoseley / gist:eeb38412d74c3eb22bc69472940b1f95
Created July 17, 2023 20:05
regex writer stringTable sizes
| Row Labels | Count of 1 |
| ----------- | ---------- |
| 0 | 12647 |
| 1 | 62735 |
| 2 | 43475 |
| 3 | 27852 |
| 4 | 17408 |
| 5 | 11870 |
| 6 | 8788 |
| 7 | 7623 |
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
namespace compressionspeed
{
internal class Program
{
static TimeSpan last = TimeSpan.Zero;
static long lastSize = 0;
@danmoseley
danmoseley / chisquared.cs
Last active December 30, 2022 19:59
test random with chi squared
using System.Diagnostics;
using System.Linq;
using System.Numerics;
internal class Program
{
public static void Main(string[] args)
{
// Check for an off-by-one type error causing us to consistently not generate values
using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Environments;
using BenchmarkDotNet.Jobs;
using BenchmarkDotNet.Running;
[MemoryDiagnoser]
@danmoseley
danmoseley / test.tars.cs
Last active August 21, 2022 21:46
test tars
// See https://aka.ms/new-console-template for more information
using System.Formats.Tar;
using Xunit;
public static class C
{
public async static Task Main()
{
List<Task> tasks = new();
using System;
using System.Text.RegularExpressions;
Regex re = new Regex(@"\Gbar", RegexOptions.Compiled);
string fooBarString = @" bar";
var match1 = re.Match(fooBarString, 1);
Console.WriteLine(String.Format("Match 1 sucess: {1} {0}", match1.Success, match1.Index));
var match2 = re.Match(fooBarString, 1, fooBarString.Length-1);
Console.WriteLine(String.Format("Match 2 sucess: {1} {0}", match1.Success, match2.Index));