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
using System; | |
using System.Collections.Generic; | |
using System.Configuration; | |
using System.Globalization; | |
using System.Net.Http; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Microsoft.Azure.WebJobs; | |
using Microsoft.Azure.WebJobs.Host; | |
using Flurl.Http; |
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
--2018-07-18 Updated to use new RANKX function to deal with duplicate timestamp values. | |
-- | |
--When there are duplicate timestamp values in the dataset, using the previous method (with EARLIER()) would create | |
--index values that run, eg, 122, 123, 123, 125, 126. | |
--Supposing therer were 100 new items per row, and ~5000 total (so total would run 4900, 5000, 5100, 5200, etc), | |
--the ValueChange would run 100, 100, 5000(!!), 100, 100. | |
--Now, using a RANKX() with Dense enumeration (https://msdn.microsoft.com/en-us/query-bi/dax/rankx-function-dax), | |
--we can get dense indices that don't skip, so we can lookup Index-1 and know it always exists. | |
------------------------------------------ |
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
--Transact-SQL script to identify and report tables/columns linked by circular FK references | |
--Original source https://azure.microsoft.com/en-us/blog/finding-circular-foreign-key-references/ | |
--Reformatted by tonesandtones and verified working against a new Azure SQL DB instance on 2018-07-16 | |
-- | |
-- | |
--Produces output like this: | |
-- dbo.Triggers -> dbo.Conversations -> dbo.Triggers | |
-- dbo.Conversations -> dbo.Triggers -> dbo.Conversations | |
-- dbo.AbpOrganizationUnits -> dbo.AbpOrganizationUnits | |
-- dbo.AbpUsers -> dbo.AbpUsers |
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 |
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
// 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
#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
{ | |
"$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
{ | |
"$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
# https://stackoverflow.com/a/48088291 | |
[includeIf "gitdir:~/toplevelFolder1/"] | |
path = ~/topLevelFolder1/.gitconfig_include |
OlderNewer