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; |
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
USE ReportServer | |
go | |
drop table if exists #reports; | |
/* 2016 Reports */ | |
WITH XMLNAMESPACES ( | |
'http://schemas.microsoft.com/SQLServer/reporting/reportdesigner' AS rd | |
,'http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition/defaultfontfamily' as df | |
,DEFAULT 'http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition' | |
),reports |
NewerOlder