Skip to content

Instantly share code, notes, and snippets.

View sharpjs's full-sized avatar
💾
Flipping bits, taking bytes

Jeff Sharp sharpjs

💾
Flipping bits, taking bytes
View GitHub Profile
@sharpjs
sharpjs / MainThreadSynchronizationContext.cs
Created December 23, 2017 18:43
A "Main Thread" SynchronizationContext
/*
Copyright (C) 2017 Jeffrey Sharp
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
@sharpjs
sharpjs / SemVer2.ps1
Last active May 22, 2018 21:42
PowerShell/.NET Regular Expression for SemVer 2.0
# Pubic Domain. No rights reserved. No warranty.
# Reference:
# https://github.com/semver/semver/blob/master/semver.md
$VersionRegex = [regex] '(?nx)
^
(?<Version>
(?<Numbers>
( 0 | [1-9][0-9]* )
(
@sharpjs
sharpjs / ApplicationInsightsReleaseAnnotation.ps1
Created December 21, 2019 00:02
How to create an Application Insights release annotation (in Octopus Deploy)
using namespace System.Net
#Requires -Version 5.1
$ErrorActionPreference = "Stop"
function New-ApplicationInsightsReleaseAnnotationCore {
param (
[Parameter(Mandatory, Position=0)]
[string] $ApplicationId,
[Parameter(Mandatory, Position=1)]
@sharpjs
sharpjs / Severities.cs
Created June 3, 2020 17:26
SQL Server Message Severities
// LEVEL GROUP KILLS EVENT LOG MEANING
// 0 Informational - - User-defined
// 1 Informational - - User-defined
// 2 Informational - - User-defined
// 3 Informational - - User-defined
// 4 Informational - - User-defined
// 5 Informational - - User-defined
// 6 Informational - - User-defined
// 7 Informational - - User-defined
// 8 Informational - - User-defined
@sharpjs
sharpjs / pinentry-manual.txt
Created September 16, 2024 14:36
Pinentry Manual
PINENTRY MANUAL
===============
The text below was generated on 2024-09-15 for pinentry 1.3.1 by the command:
|
| info --subnodes --output=pinentry-manual.txt pinentry
|
Unwanted text and sections have been removed manually.