Skip to content

Instantly share code, notes, and snippets.

View seankearon's full-sized avatar
coding up a storm!


coding up a storm!
View GitHub Profile
seankearon / AzureStorageConnectionStringParser.cs
Last active July 13, 2022 14:31
Simple Azure Storage Connection String Parser
using System;
using System.Collections.Generic;
/// <summary> Based on Patric Macvey's answer here </summary>
public class AzureStorageConnectionStringParser
readonly Dictionary<string, string> _values = new Dictionary<string, string>();
readonly string _connectionString;
public AzureStorageConnectionStringParser(string connectionString)
# --------------------------------------------------------------------------------
# Registers an IP rule to allow access to a SQL Azure DB from the current machine's IP.
# --------------------------------------------------------------------------------
# --------------------------------------------------------------------------------
# This assumes you are running PowerShell 7 or greater.
# Install the Azure and Azure SQL modules.
# Install-Module -Name Az -AllowClobber -Scope CurrentUser
function Invoke-Environment {
# Source:
# and
$stream = if ($Output) { ($temp = [IO.Path]::GetTempFileName()) } else { 'nul' }
seankearon / Program.fs
Last active April 6, 2020 07:32
Using EF Core with CosmosDB in F#
open System
open Microsoft.EntityFrameworkCore
type [<CLIMutable>] LegacyForm = {
id: string // The form's UID.
Client: string
CompanyId: int
Number: string
InstallationAddress: string
seankearon / ModusTollens.cs
Last active January 12, 2020 11:03
Curry-Howard Exercise
// (A => B and not B) => not A
Not<A> ModusTollens<A, B>(
Func<A, B> A_implies_B,
Not<B> not_B)
Absurd A_to_Absurd(A a)
return not_B.Apply(A_implies_B(a));
return new Not<A>(A_to_Absurd);
seankearon / do it.bat
Created November 11, 2019 13:55
Set Git to use Beyond Compare
git config --global diff.tool bc3
git config --global difftool.bc3.path "C:\Program Files\Beyond Compare 4\bcomp.exe"
git config --global merge.tool bc3
git config --global mergetool.b3c.path "C:\Program Files\Beyond Compare 4\bcomp.exe"
git config --global difftool.prompt false
Deployment steps for this blog post:
seankearon / gist:de261ac578de1a735b26f23b0ce78155
Created August 31, 2017 07:29 — forked from robertpi/gist:2964793
F# record implementing an interface
namespace MyNamespace
type IMyInterface =
abstract GetValue: unit -> string
type MyRecord =
{ MyField1: int
MyField2: string }
interface IMyInterface with
member x.GetValue() = x.MyField2
# PLUS: npm install --global --production windows-build-tools
choco install spotify -y
choco install visualstudiocode -y
choco install microsoftazurestorageexplorer -y
choco install sourcetree --version -y
choco install webstorm -y
choco install jetbrainstoolbox -y
# not updated choco install jetbrains-rider -y
choco install balsamiqmockups3 -y
seankearon / CreateAndQuery.cs
Last active September 7, 2016 21:36
Marten Queries
using System;
using System.Collections.Generic;
using System.Linq;
using Marten;
using Xunit;
namespace marten_test
public class CreateAndQuery