Skip to content

Instantly share code, notes, and snippets.

View stuarthallows's full-sized avatar

Stuart Hallows stuarthallows

  • Vector Technologies
  • Adelaide, Australia
View GitHub Profile
@stuarthallows
stuarthallows / ghostty.config
Created December 22, 2025 23:25
Ghostty configuration
confirm-close-surface = false
font-family = "JetBrainsMono Nerd Font"
theme = "Dracula"
background-opacity = 0.95
macos-titlebar-style = "tabs"
window-save-state = always
window-padding-x = 8
window-padding-y = 8
keybind = shift+enter=text:\n
# Quick edits
alias reload='source ~/.zshrc'
# Development shortcuts
alias tree='tree -C' # Colourized tree
# Modern replacements (install via brew/apt/etc first)
alias cat='bat' # Better cat with syntax highlighting
alias top='htop' # Better top
alias du='dust' # Better du
// 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
.grow {
transition: transform 150ms ease-out 0s;
&:hover {
transform: scale(1.02);
}
}
.shift {
transition: transform 150ms ease-out 0s;
@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 / 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.
@stuarthallows
stuarthallows / structuringJavaScript.js
Last active January 16, 2019 15:51
Notes from the Pluralsight course, 'Structuring JavaScript Code'.
// PROTOTYPE
// Modularize code into re-usable objects, take variables and functions out of global namespace,
// functions loaded into memory once whereas the state is all held in the objects, can override
// functions through prototyping.
// Drawbacks: heavy use of 'this' keyword and the constructor is separate from the prototype definition.
var Calculator = function(eq) {
// Variables defined in constructor and are unique to each instance.
this.eqCtl = document.GetElementById(eq);