Skip to content

Instantly share code, notes, and snippets.

[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static bool IsUrlSafeChar(char ch)
{
/*
if (ch >= 'a' && ch <= 'z' || ch >= 'A' && ch <= 'Z' || ch >= '0' && ch <= '9')
return true;
switch (ch)
{
case '-':
@jkotas
jkotas / gist:6fb00a78442c72440963
Last active January 10, 2016 07:34
Thread id scalability test
using System;
using System.Runtime.CompilerServices;
using System.Threading;
class Program
{
static void Work()
{
ManagedThreadId.Current.ToString();
}
@jkotas
jkotas / gist:a21de87b790e06979635
Created January 6, 2016 00:37
Strong name signing utilitity
using System;
using System.IO;
using System.Reflection.PortableExecutable;
using System.Security.Cryptography;
using System.Runtime.InteropServices;
using System.Collections.Immutable;
static class ImmutableArrayHelpers
{
// Avoid unnecessary copy