Skip to content

Instantly share code, notes, and snippets.

View jasonhorner's full-sized avatar
🌴
On vacation

Jason Horner jasonhorner

🌴
On vacation
View GitHub Profile
@jasonhorner
jasonhorner / mtb-settings.md
Last active August 16, 2025 12:03
MTB Settings Guide

2022 Stumpjumper Expert Suspension & Tire Settings

Suspension Components

  • Rear Shock: FOX FLOAT DPS Performance Elite, Rx Trail Tune, EVOL Air sleeve, 3-position adjustment w/ Open Mode Adjustment, 190x45mm
  • Fork: FOX FLOAT 34 Performance Elite, GRIP2 damper, 15x110mm, 44mm offset, 140mm travel

Component Setting Manufacturer (240 lbs, 6'5") Current Bike Park Trail
@jasonhorner
jasonhorner / installtools.cmd
Created September 19, 2024 08:15
Winget Install Script
@echo off
echo Installing applications using winget...
set apps=(
"Microsoft.AzureCLI"
"Microsoft.AzureDeveloperCLI"
"Git.Git"
"GitHub.cli"
"Microsoft.Powershell"
"Microsoft.WindowsTerminal"
@jasonhorner
jasonhorner / assign-roles.sh
Last active September 10, 2024 03:23
Assigns Azure Entra Roles
#!/bin/bash
# Input parameters
userPrincipalName=$1
tenantId=$2
# Check if both parameters are provided
if [ -z "$userPrincipalName" ] || [ -z "$tenantId" ]; then
echo "Usage: $0 <userPrincipalName> <tenantId>"
exit 1
@jasonhorner
jasonhorner / database-metadata-metrics
Last active February 15, 2024 17:16
SQL Server metadata query with column info
with schema_info
as (SELECT t.table_catalog
, t.table_schema
, t.table_name
, (
SELECT
c.column_name,
c.ordinal_position,
CASE
WHEN c.DATA_TYPE IN ('varchar', 'char', 'varbinary', 'binary') THEN
@jasonhorner
jasonhorner / AzureSqlMonitoring.md
Last active October 2, 2021 19:28
Resources for my Azure SQL Monitoring Talk

Azure SQL Monitoring Resources

This page has the resources for my Azure SQL Monitoring Talk

Abstract

Migrating you on-premises Database to Azure SQL DB was easy but now comes the hard part how do you setup monitoring and alerts? While there are many 3rd party options, let's have a look at what comes standard with Azure:

  • Using Azure Log Analytics to monitor databases
  • How can you be sure your azure SQL Database isn't under or over allocated, so that your costs are optimized.
  • How can you project what future costs may be.
@jasonhorner
jasonhorner / sql_table_metadata.sql
Created August 16, 2021 17:31 — forked from OsirisDBA/sql_table_metadata.sql
SQL Server Table Metadata
DECLARE @SchemaName sysname = ''
, @TableName sysname = '';
WITH pk /* Primary Keys */
AS ( SELECT t.object_id
, pkc.column_id
, ic.index_column_id pk_index
, pk.name AS pk_name
FROM sys.tables t
JOIN sys.schemas s ON s.schema_id = t.schema_id
@jasonhorner
jasonhorner / sql_table_metadata.sql
Created August 16, 2021 17:31 — forked from OsirisDBA/sql_table_metadata.sql
SQL Server Table Metadata
DECLARE @SchemaName sysname = ''
, @TableName sysname = '';
WITH pk /* Primary Keys */
AS ( SELECT t.object_id
, pkc.column_id
, ic.index_column_id pk_index
, pk.name AS pk_name
FROM sys.tables t
JOIN sys.schemas s ON s.schema_id = t.schema_id
@jasonhorner
jasonhorner / sql_table_metadata.sql
Created August 16, 2021 17:31 — forked from OsirisDBA/sql_table_metadata.sql
SQL Server Table Metadata
DECLARE @SchemaName sysname = ''
, @TableName sysname = '';
WITH pk /* Primary Keys */
AS ( SELECT t.object_id
, pkc.column_id
, ic.index_column_id pk_index
, pk.name AS pk_name
FROM sys.tables t
JOIN sys.schemas s ON s.schema_id = t.schema_id