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
declare @mailFromDomain nvarchar(128) = N'@foo.com' | |
declare @username nvarchar(128) = 'apikey' | |
declare @password nvarchar(128) = 'SG.SECRETS'; | |
declare @port int = 587; | |
declare @server nvarchar(128) = 'smtp.sendgrid.com' | |
declare @replyTo nvarchar(128) = 'donotreply' + @mailFromDomain; | |
declare @serverName nvarchar(128) = substring(@@servername,8,100); | |
declare @emailAddress nvarchar(128) = @serverName + @mailFromDomain; | |
declare @displayName nvarchar(128) = @serverName; |
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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFrameworks>net7.0;net6.0;net5.0;netcoreapp3.1;net48;netcoreapp2.1</TargetFrameworks> | |
<LangVersion>7.3</LangVersion> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="BenchmarkDotNet" Version="0.13.1" /> |
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 BenchmarkDotNet.Running; | |
using BenchmarkDotNet.Attributes; | |
using Microsoft.Extensions.Caching.Memory; | |
public class Program | |
{ | |
public static void Main(string[] args) => | |
BenchmarkSwitcher.FromAssemblies(new[] { typeof(Program).Assembly }).Run(args); | |
} |
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
<div class="test"> | |
<div>One</div> | |
<div>Two</div> | |
</div> |
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
$majorVersion = $PSVersionTable.PSVersion.Major | |
$pesterModules = Get-Module -ListAvailable -Name Pester | |
$sqlserverModules = Get-Module -ListAvailable -Name SqlServer | |
$versionOk = $majorVersion -ge 7 | |
$pesterOk = ($pesterModules | Where-Object { $_.Version.Major -eq 4 -and $_.Version.Minor -ge 10 } | Measure-Object).Count -ge 1 | |
$sqlServerOk = ($sqlserverModules | Where-Object { $_.Version.Major -ge 21 -and $_.Version.Minor -ge 1 } | Measure-Object).Count -ge 1 | |
if($versionOk -and $pesterOk -and $sqlServerOk) { | |
Write-Output "All dependencies ok" |
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
Connect-AzAccount | |
$allPerfCounters = @() | |
$subscriptions = Get-AzSubscription | |
foreach ($subscription in $subscriptions) { | |
$subscription | Set-AzContext | |
$workspaces = Get-AzOperationalInsightsWorkspace | |
foreach ($workspace in $workspaces) { |
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
// npm install node-fetch | |
const fetch = require('node-fetch'); | |
module.exports = async function (context, req) { | |
const body = req.rawBody || JSON.stringify({text: 'Hello World'}); | |
if(!body) { | |
context.log('No request body found.'); | |
return; | |
} |
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
$payload = @" | |
{ | |
"text": "Danny Torrence left a 1 star review for your property.", | |
"blocks": [ | |
{ | |
"type": "section", | |
"text": { | |
"type": "mrkdwn", | |
"text": "Danny Torrence left the following review for your property:" | |
} |
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
import React from "react"; | |
import styled from "styled-components"; | |
const MinorSelect = styled.select` | |
appearance: none; | |
background-color: #edf2f7; | |
border: 0.0625rem solid grey; | |
border-radius: 0.5rem; | |
font-size: 1.5rem; | |
padding: 1rem; |
NewerOlder