Skip to content

Instantly share code, notes, and snippets.

View Tiberriver256's full-sized avatar
📚
Still learning

Micah Rairdon Tiberriver256

📚
Still learning
View GitHub Profile
@Tiberriver256
Tiberriver256 / ShowCascadingDeletions.sql
Created March 24, 2025 15:41
A SQL script to iterate through all your tables in MSSQL and show cascading deletes and dependencies
-- Script to show delete dependencies for all tables
SET NOCOUNT ON;
-- Declare variables
DECLARE
@TableName varchar(128),
@p varchar(128),
@c1 varchar(128),
@c2 varchar(128),
@c3 varchar(128),
@Tiberriver256
Tiberriver256 / rules.txt
Last active March 2, 2025 03:31
Cursor Global Rules
You loooooooooove PowerShell. You prefer to use it for almost every task.
You're convinced there's pretty much a PowerShell module for everything these days.
You see what's installed and look for particular commands using 'Get-Command'
You get help for the command before running it using 'Get-Help <command>' and then 'Get-Help <comman> -Examples'
When no commands can be found, you search for modules using find-module
You install new modules using 'Install-Module'
You look for commands with a module using 'Get-Command -Module <module-name>'
You like to avoid printing unecessary content so you use heavily the 'Select-Object' and 'Where-Object' commands
Directory structure:
└── modelcontextprotocol-typescript-sdk/
├── README.md
├── CLAUDE.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── SECURITY.md
├── eslint.config.mjs
├── jest.config.js
# /// script
# dependencies = [
# "crawl4ai",
# "asyncio"
# ]
# ///
import asyncio
from crawl4ai import *
import os
@Tiberriver256
Tiberriver256 / Get-BuildPipelineScopedChanges.ps1
Created August 28, 2024 23:29
A PowerShell script to get associated work items for an Azure DevOps build
#Requires -PSEdition Core
<#
.SYNOPSIS
Retrieves distinct commits and associated work items for a build pipeline... with support for monorepos!
See the blog post at https://tiberriver256.github.io/DevOps/azure-devops-pipelines-related-work-items-monorepo for more information.
.DESCRIPTION
This script retrieves the distinct commits and associated work items for a build pipeline. It requires the following parameters:
@Tiberriver256
Tiberriver256 / FeatureFileSplitter.csproj
Created December 18, 2023 17:02
A simple console app for splitting SpecFlow feature files. The aim here is to support scenario level parallelization, which is not natively supported in SpecFlow.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
@Tiberriver256
Tiberriver256 / Update-TaskGroupInputParameter.ps1
Created February 7, 2023 19:44
Update an Azure DevOps Task Group Input Parameter type from string to a multiLine string
# NOTE:
# This change will probably be reverted the next time you save the task group in the UI... I am sorry
$MyPat = "INSERT_PAT_TOKEN_WITH_TASK_GROUP_SCOPES"
$TaskGroupId = "INSERT_TASK_GROUP_ID"
$Organization = "INSERT_ORGANIZATION"
$Project = "INSERT_PROJECT"
$VariableToChange = "INSERT_VARIABLE_NAME_YOU_WANT_MULTILINE"
@Tiberriver256
Tiberriver256 / Get-GitLogStats.ps1
Last active December 4, 2022 18:39
Runs a git log in PowerShell and prints options as a PowerShell custom object
<#
.SYNOPSIS
Runs a git log in PowerShell and prints options as a PowerShell custom object
.EXAMPLE
PS> Get-GitLogStats -CommitHash -AuthorName -AuthorEmail -AdditionalArgs '--since="30 days ago"'
CommitHash AuthorName AuthorEmail
---------- ---------- -----------
5426c8744a7fa3a602122738415ab32c80f2c1ad Micah Rairdon [email protected]
5427c8744a7fa3a602122738415ab32c80f2c1ad Micah Rairdon [email protected]
@Tiberriver256
Tiberriver256 / Get-AzureDevOpsAgentSpecifications.ps1
Last active October 16, 2021 21:44
Used to generate a report of Azure DevOps agent specifications to determine which classic build/release definitions are using different operating systems
Import-Module VSTeam
function Get-AzureDevOpsAgentSpecifications {
[CmdletBinding()]
param(
[Parameter(Mandatory)]
[string]
$Account,
@Tiberriver256
Tiberriver256 / Get-DadJokeIpsum.ps1
Created July 23, 2021 13:55
Get me some dad jokes
<#
.SYNOPSIS
Get some filler text that is dad jokes
.PARAMETER minLength
The minimum length of text you need
PS> Get-DadJokeIpsum -minLength 500
Where did Captain Hook get his hook? From a second hand store. Why was the broom late for the meeting? He overswept. Dad, can you put my shoes on? I don't think they'll fit me. For Valentine's day, I decided to get my wife some beads for an abacus. It's the little things that count. Why is the ocean always blue? Because the shore never waves back. How does a dyslexic poet write? Inverse. Whiteboards ... are remarkable. Want to hear a joke about construction? Nah, I'm still working on it. Why do scuba divers fall backwards into the water? Because if they fell forwards theyâd still be in the boat. Some people say that comedians who tell one too many light bulb jokes soon burn out, but they don't know watt they are talking about. They're not that bright. Don't trust atoms. They make up everything. I am terrified of elevators. Iâm going to start taking steps to