Skip to content

Instantly share code, notes, and snippets.

View stuarthallows's full-sized avatar

Stuart Hallows stuarthallows

  • Willow Inc.
  • Adelaide, Australia
View GitHub Profile
// Top slowest endpoints by 95th percentile
requests
| where timestamp > ago(7d)
| summarize avg_duration=avg(duration), percentiles(duration, 50, 95, 99), RequestCount=count() by name, cloud_RoleName
| top 25 by percentile_duration_95
| project endpoint=name, cloud_RoleName, avg=round(avg_duration), p50=round(percentile_duration_50), p95=round(percentile_duration_95), p99=round(percentile_duration_99), RequestCount
| order by p95 desc
// Top 10 slowest endpoints by average duration
requests
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Tooltips</title>
<style>
*,
*::before,
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Custom Checkbox</title>
<style>
*,
*::before,
.grow {
transition: transform 150ms ease-out 0s;
&:hover {
transform: scale(1.02);
}
}
.shift {
transition: transform 150ms ease-out 0s;
#
# Script to extract a ProductId from an MSI file.
#
# Author: Nickolaj AndersenAugust
# https://www.scconfigmgr.com/2014/08/22/how-to-get-msi-file-information-with-powershell/
#
param(
[parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
@stuarthallows
stuarthallows / date-table-creation.dax
Last active November 25, 2018 00:11
DAX to generate a date table for all dates in the model
Dates =
VAR BaseCalendar = CALENDARAUTO()
RETURN
GENERATE (
BaseCalendar,
VAR BaseDate = [Date]
RETURN ROW (
"Year", YEAR(BaseDate),
"Quarter", INT(FORMAT(BaseDate, "q")),
"Month", MONTH(BaseDate),
@stuarthallows
stuarthallows / material-breakpoints.html
Created June 4, 2017 02:36
Show Angular Material breakoint size, for debugging responsive layout
<div>
<div fxHide fxHide.xs="false">Extra Small</div>
<div fxHide fxHide.sm="false">Small</div>
<div fxHide fxHide.md="false">Medium</div>
<div fxHide fxHide.lg="false">Large</div>
<div fxHide fxHide.xl="false">Extra Large</div>
</div>
@stuarthallows
stuarthallows / cosmosdb-linqpad.linq
Last active May 21, 2017 05:04
Play with Cosmos DB from LINQPad
<Query Kind="Program">
<NuGetReference>Microsoft.Azure.DocumentDB</NuGetReference>
<Namespace>Microsoft.Azure.Documents</Namespace>
<Namespace>System.Threading.Tasks</Namespace>
<Namespace>Microsoft.Azure.Documents.Client</Namespace>
<Namespace>Microsoft.Azure.Documents.Linq</Namespace>
<Namespace>Newtonsoft.Json</Namespace>
</Query>
private static readonly string DatabaseId = "ToDoList";
@stuarthallows
stuarthallows / typescriptFundamentals.ts
Created November 7, 2015 06:42
Notes from the Pluralsight course 'TypeScript Fundamentals'.
/*
Module 1 - Getting Started with Typescript
******************************************
Runs in any browser, on any host, on any OS, is open source, with good tool support.
Supports;
any JS code,
static typing,
encapsulation through classes and modules,
@stuarthallows
stuarthallows / jQueryTipsAndTricks.js
Last active December 20, 2015 22:29
Notes from the Pluralsight course 'jQuery Tips and Tricks'.
// MODULE 1
// visit jsperf.com to write and run performance tests.
// use a CDN with a fallback, see html5 boilerplate.
// working with selectors
// consider prefixing variable names with $ when holding jQuery objects.