This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -------------------------------------------------------------------------------- | |
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
open Microsoft.EntityFrameworkCore | |
type [<CLIMutable>] LegacyForm = { | |
id: string // The form's UID. | |
Client: string | |
CompanyId: int | |
Number: string | |
InstallationAddress: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// (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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace MyNamespace | |
type IMyInterface = | |
abstract GetValue: unit -> string | |
type MyRecord = | |
{ MyField1: int | |
MyField2: string } | |
interface IMyInterface with | |
member x.GetValue() = x.MyField2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Marten; | |
using Xunit; | |
namespace marten_test | |
{ | |
public class CreateAndQuery | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Invoke-Environment { | |
# Source: http://stackoverflow.com/a/4385011/2608 | |
# and https://github.com/nightroman/PowerShelf/blob/master/Invoke-Environment.ps1 | |
param | |
( | |
[Parameter(Mandatory=1)][string]$Command, | |
[switch]$Output, | |
[switch]$Force | |
) | |
$stream = if ($Output) { ($temp = [IO.Path]::GetTempFileName()) } else { 'nul' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
NewerOlder