🤹♂️
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
task: PowerShell@2 | |
displayName: "Dev Azure tasks and GOTCHAS" | |
inputs: | |
targetType: 'inline' | |
script: | | |
# Write your PowerShell commands here. | |
@" | |
DevAzure tasks and GOTCHAS: NuGet.config, MsBuild Path, Unit Tests, Integration Tests | |
"@ |
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.Collections.Generic; | |
/// <summary> | |
/// A <see cref="Dictionary{TKey,TValue}<K,V>"/> which, if you try to read | |
/// an empty entry, returns default(V) instead of throwing an exception. | |
/// </summary> | |
/// <remarks> | |
/// If you cast a <see cref="DDictionary{K,V}"/> to a <see cref="Dictionary{TKey,TValue}"/> | |
/// then reading an empty entry will throw. | |
/// <code> |
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.Diagnostics.CodeAnalysis; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
public static class StringExtensions | |
{ | |
/// <summary>Trim one occurrence of <paramref name="terminator"/> string from | |
/// the end of <paramref name="str"/>, if there is one. |
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.Diagnostics; | |
using EFCoreAndDomainModels.Application; | |
using EFCoreAndDomainModels.Domain; | |
using EFCoreAndDomainModels.Infrastructure; | |
using Microsoft.EntityFrameworkCore; | |
using Microsoft.EntityFrameworkCore.Design; | |
using TestBase; | |
using Xunit.Abstractions; | |
namespace EFCoreAndDomainModels |
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
#! /usr/bin/env sh | |
cat << 'EOF' | |
Get pricing: | |
location.href="https://prices.azure.com/api/retail/prices?$skip=0¤cyCode='GBP'&$filter=location eq 'UK South' and serviceName eq 'Virtual Machines' and priceType eq 'Consumption'" | |
Create Spot VM | |
az vm create -g VM --name VM --admin-username azureuser --image CentOS --generate-ssh-keys --public-ip-sku Standard --priority Spot --eviction-policy Delete | |
Destroy VM |
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
// | |
// Dependency: dotnet add package Azure.Storage.Blobs | |
// #r "nuget:Azure.Storage.Blobs" | |
// | |
// Parallel download blobs from an Azure Blob Storage container, and report speed and bandwidth metrics | |
// As is, this code searches for blobs by index tag. To download by virtual folder instead, | |
// replace blobItems = containerClient.FindBlobsByTags(indexTagFilter) with | |
// blobItemsUntagged = containerClient.GetBlobs(); | |
// | |
using System.Diagnostics; |
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
# This is Git's per-user configuration file. | |
# [user] | |
[alias] | |
root = rev-parse --show-toplevel | |
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit | |
[merge] | |
tool = p4merge | |
[color] | |
ui = true | |
[color "status"] |
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
#Requires AutoHotkey v2.0 | |
; | |
; AutoHotKey 2.0 typographic relief for Mac keyboard users on Windows, whether | |
; | |
; — plugging a Mac Keyboard into a PC | |
; — or just missing the extended typographic symbols that the Mac puts on the Alt keys. | |
; | |
; Set these Switches to true/false to match your preferences | |
; | |
; |
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
# https://gist.github.com/chrisfcarroll/f3ecb2892f996149ee039d48abb57101 | |
# Aliases and Paths for PowerShell Profile ~\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 | |
# | |
# ---------------------------------------------------- | |
# For machines where you have no privileges you should be able to enable scripts for yourself only with: | |
# | |
# `Set-ExecutionPolicy RemoteSigned -Scope CurrentUser` | |
# ---------------------------------------------------- | |
# | |
# Sections: Paths, Editors, Tab Completion, Git abbreviations, Docker abbreviations, other prefs, firstRun |
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
#nullable enable | |
using Microsoft.Extensions.Logging; | |
using Microsoft.VisualBasic; | |
using System; | |
using System.Diagnostics; | |
using System.Diagnostics.CodeAnalysis; | |
using System.Linq; | |
namespace LogAssert | |
{ |
NewerOlder