Skip to content

Instantly share code, notes, and snippets.

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

seankearon

💭
coding up a storm!
View GitHub Profile
# PLUS: npm install --global --production windows-build-tools
choco install spotify -y
choco install visualstudiocode -y
choco install microsoftazurestorageexplorer -y
choco install sourcetree --version 1.9.10.0 -y
choco install webstorm -y
choco install jetbrainstoolbox -y
# not updated choco install jetbrains-rider -y
choco install balsamiqmockups3 -y
@seankearon
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
@seankearon
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
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
# --------------------------------------------------------------------------------
# Registers an IP rule to allow access to a SQL Azure DB from the current machine's IP.
# --------------------------------------------------------------------------------
# SETUP
# --------------------------------------------------------------------------------
# This assumes you are running PowerShell 7 or greater.
#
# Install the Azure and Azure SQL modules.
#
# Install-Module -Name Az -AllowClobber -Scope CurrentUser
@seankearon
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 https://stackoverflow.com/a/60998564/2608 </summary>
public class AzureStorageConnectionStringParser
{
readonly Dictionary<string, string> _values = new Dictionary<string, string>();
readonly string _connectionString;
public AzureStorageConnectionStringParser(string connectionString)