Skip to content

Instantly share code, notes, and snippets.

View aligneddev's full-sized avatar

Kevin aligneddev

View GitHub Profile
@aligneddev
aligneddev / appConfigAndKeyValut.fsx
Last active January 3, 2025 20:17
Use F# to run az cli commands to add Azure App Config and Key Vault values
// https://aligneddev.net/blog/2024/fsharp-for-cli-commands/
// If you know how to get the Key Vault commands to work inside of the script, please let me know
// open in VS Code,
// click the Run Script button
// or highlight and Alt+Enter to run
// or in cli in this tools directory `dotnet fsi .\appConfigAndKeyVault.fsx`
// az --version to find the az.exe path
// az login
// az account show to check your current subscription
@aligneddev
aligneddev / Windows Terminal
Created January 6, 2021 16:12
My Windows Terminal - found in C:\Users\klogan\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState
// This file was initially generated by Windows Terminal 0.11.1191.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@aligneddev
aligneddev / testMethodAsync.snippet
Last active June 30, 2020 17:32
testma to get a test method that is async Task (built in testm is public void)
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
<Title>Test Method Async</Title>
<Shortcut>testma</Shortcut>
<Description>Code snippet for a test method</Description>
@aligneddev
aligneddev / SystemTime
Last active March 15, 2021 16:16
SystemTime wrapper around DateTime for a unit testing hook
// another option? https://blog.burgyn.online/2019/12/06/date-time-provider
using System;
namespace Shared.Core.Implementations
{
/// <summary>
/// Testable alternative to DateTime.Now or DateTimeOffset.Now
/// </summary>
public static class SystemTime
{
@aligneddev
aligneddev / aaa.snippet
Created March 18, 2020 20:33
Unit Testing - Act Arrange Assert
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>aaa</Title>
<Shortcut>aaa</Shortcut>
<Description>AAA for tests</Description>
<Author>Microsoft Corporation</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
@aligneddev
aligneddev / moqItIsAny.snippet
Created March 18, 2020 20:33
Visual Studio C# Snippets
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Moq It.IsAny</Title>
<Shortcut>mia</Shortcut>
<Description>Moq.It.IsAny for tests</Description>
<Author>Kevin Logan</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<title>JS inheritance</title>
</head>
<body>
<div id="mainContent">