This file contains hidden or 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
// TODO: REMOVE | |
app.Use(async (ctx, next) => { | |
var logger = app.ApplicationServices.GetRequiredService<ILogger>(); | |
var path = ctx.Request.Path; | |
logger.LogInformation($"Path = {path}"); | |
foreach (var header in ctx.Request.Headers.ToList()) | |
{ | |
string value = string.Join(':', header.Value.ToList()); | |
logger.LogInformation($"Header '{header.Key}' = '{value}'"); | |
} |
This file contains hidden or 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
-- Add source | |
dotnet nuget add source C:\dev\nuget\local | |
-- pack a package | |
dotnet pack --no-build --no-restore /p:Version=0.1.23-prerelease-01 | |
-- publish | |
dotnet nuget push -s C:\dev\nuget\local .\src\<project>\bin\Debug\<project>.0.1.23-prerelease-01.nupkg |
This file contains hidden or 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
[credential] | |
helper = /mnt/c/Program\\ Files/Git/mingw64/libexec/git-core/git-credential-manager-core.exe | |
# or | |
# $ git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/libexec/git-core/git-credential-manager-core.exe" |
This file contains hidden or 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://stackoverflow.com/a/48088291 | |
[includeIf "gitdir:~/toplevelFolder1/"] | |
path = ~/topLevelFolder1/.gitconfig_include |
This file contains hidden or 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
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"blocks": [ | |
{ | |
"type": "prompt", | |
"alignment": "left", | |
"segments": [ | |
{ | |
"type": "shell", | |
"style": "plain", |
This file contains hidden or 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
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"blocks": [ | |
{ | |
"alignment": "left", | |
"segments": [ | |
{ | |
"type": "shell", | |
"style": "powerline", | |
"powerline_symbol": "\uE0B0", |
This file contains hidden or 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
#Tones' Oh-My-Posh Powershell profile | |
# One time setup: https://ohmyposh.dev/docs/installation/windows (or your OS of choice) | |
# Install-Module -Name Terminal-Icons -Repository PSGallery | |
Import-Module Terminal-Icons | |
oh-my-posh init pwsh --config "~/posh/.posh.tones.honukaiterm.json" | Invoke-Expression | |
# PowerShell parameter completion shim for the dotnet CLI | |
Register-ArgumentCompleter -Native -CommandName dotnet -ScriptBlock { |
This file contains hidden or 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
// See the original in context at https://github.com/tonesandtones/link-redirector/blob/238a142577e72070010eb6643726bc8b94899b69/deploy/deploy.bicep | |
param location string = resourceGroup().location | |
param appBaseName string = 'linky' | |
param environmentSuffix string { | |
default: 'dev' | |
allowed: [ | |
'dev' | |
'prod' | |
] |
This file contains hidden or 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
{ | |
"type": "Microsoft.Web/sites/networkConfig", | |
"name": "[concat(parameters('webAppName'),'/VirtualNetwork')]", | |
"apiVersion": "2016-08-01", | |
"properties": | |
{ | |
"subnetResourceId": "[parameters('subnetResourceId')]", | |
"swiftSupported": true | |
} | |
} |
This file contains hidden or 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
#Read an environment variable where the name is given in another variable | |
$EnvironmentVariableVariableName = "VAR_NAME_HERE" | |
$value = (Get-Item env:$EnvironmentVariableVariableName).Value | |
## Decode an ARM output block as JSON and set the output variables as Azure DevOps pipeline variables | |
#include iterating over the PsCustomObject field names (which are the variable names) and using them as property keys to access the values | |
$outputBlockAsJson = '{"variable1":{"type":"string","value":"value1"},"variable2":{"type":"string","value":"value2"}}' | |
$outputs = $outputBlockAsJson | ConvertFrom-Json |
NewerOlder