Skip to content

Instantly share code, notes, and snippets.

View commonsensesoftware's full-sized avatar

Chris Martinez commonsensesoftware

View GitHub Profile
@commonsensesoftware
commonsensesoftware / ApiVersionAttribute.cs
Created May 5, 2023 00:06
Implement Custom API Version Format
public sealed class ApiVersionAttribute : Asp.Versioning.ApiVersionAttribute
{
public ApiVersionAttribute( string version )
: base( CustomApiVersionParser.Default, version ) { }
public ApiVersionAttribute( string token1, string token2, string? token3 = default )
: base( new CustomApiVersion( token1, token2, token3 ) ) { }
}
@commonsensesoftware
commonsensesoftware / Badges
Created March 29, 2023 20:56
GitHub Action Badges
Badges
@commonsensesoftware
commonsensesoftware / Cargo.toml
Last active October 30, 2023 22:38
JSON Streaming in Rust
[package]
name = "json-streaming"
version = "0.1.0"
edition = "2021"
[[bin]]
name = "streamjson"
path = "main.rs"
[dependencies]
@commonsensesoftware
commonsensesoftware / DotNet4Console.csproj
Created June 9, 2022 18:27
.NET 4.0 Console using VS2022
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net40</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net40" Version="1.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
@commonsensesoftware
commonsensesoftware / Base64Url.cs
Last active January 15, 2020 03:10
Sample Base64Url Implementation
namespace Microsoft.Example
{
using System;
using System.Buffers;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using Microsoft.Example.Text;
using static System.Text.Encoding;
/// <summary>