Skip to content

Instantly share code, notes, and snippets.

View mitchdenny's full-sized avatar
💭
Currently setting my user status :)

Mitch Denny mitchdenny

💭
Currently setting my user status :)
View GitHub Profile
parameters:
Artifacts: []
ArtifactName: 'not-specified'
stages:
- stage: Signing
dependsOn: ${{parameters.DependsOn}}
jobs:
- deployment: SignPackage
environment: wherewesign
@mitchdenny
mitchdenny / Clean-GitBranches.ps1
Last active October 24, 2021 23:47
PowerShell one-liner to clean up all the branches in your local clone except for master. Be careful!
git branch | % { $_.Replace("*", "").Trim() } | where { $_ -ne "main" } | % { git branch -D $_ }
#!/bin/bash
# Check that the jq utility is installed.
which jq > /dev/null
if [ $? -ne 0 ]; then
echo "jq package not detected. Install using: sudo apt install jq"
exit 1
fi
# Check that the Azure CLI is installed.
@mitchdenny
mitchdenny / Program.cs
Last active November 13, 2022 06:33
PartitionedRateLimiter does not honour AutoReplenishment = false
using System.Threading.RateLimiting;
var concurrency = 1;
var partitionedRateLimiter = PartitionedRateLimiter.Create<Guid, Guid>((r) =>
{
return RateLimitPartition.Get(r, (key) =>
{
var rateLimiter = new TokenBucketRateLimiter(new()
{