Skip to content

Instantly share code, notes, and snippets.

View potatoqualitee's full-sized avatar
clauding

Chrissy LeMaire potatoqualitee

clauding
View GitHub Profile
@potatoqualitee
potatoqualitee / blog-refresh.md
Created November 3, 2025 15:59
blog-refresh.md

Audit and update this blog post. The blog covers various topics including dbatools, PowerShell, SQL Server, and technology.

CONTEXT:

  • Blog content spans multiple technical topics and time periods
  • Current year is 2025
  • Local blog repository is at C:\github\blog
  • Various repositories may be available locally for reference

IMPORTANT: THIS TASK REQUIRES NUANCE

@potatoqualitee
potatoqualitee / fixes.md
Created October 26, 2025 09:57
fixes.md

Update Hugo Blog Post Titles and Migrate wp-content Images

You are updating Hugo markdown blog posts to fix title capitalization and migrate WordPress images to the correct Hugo directory structure.

Task

Given a migrated blog post file:

  1. Convert titles and subtitles to Title Case
  2. Find all wp-content image references
  3. Copy referenced images from WordPress directory to Hugo static directory
@potatoqualitee
potatoqualitee / migration.md
Created October 6, 2025 11:31
Pester v4 to v5 to v6

The Problem We Avoided for Years

dbatools has 3,500+ Pester tests spread across 707 test files. For years, we put off migrating from Pester v4 to v5 because the sheer volume felt impossible. The thought of manually converting hundreds of test files, each with their own quirks, edge cases, and complex SQL Server integration scenarios, was overwhelming.

But avoiding it wasn't making it go away. Pester v4 was deprecated, and we knew we'd have to migrate eventually. The question wasn't if, but when and how.


Why August 2025 Was Different

@potatoqualitee
potatoqualitee / dbatools-certificate-error-fix-skipublishercheck.md
Last active August 6, 2025 00:02
Fix: dbatools Update-Module Install-Module SkipPublisherCheck Error (August 2025)

Fix: dbatools Update-Module Install-Module SkipPublisherCheck Error (August 2025)

The Error You're Seeing

PackageManagement\Install-Package : Authenticode issuer 'CN=dbatools, O=dbatools,
L=Vienna, S=Virginia, C=US' of the new module 'dbatools' with version '2.5.5' from
root certificate authority 'CN=Microsoft Identity Verification Root Certificate
Authority 2020, O=Microsoft Corporation, C=US' is not matching with the authenticode
issuer 'CN=dbatools, O=dbatools, L=Vienna, S=Virginia, C=US' of the previously-installed
function Import-Dbatools {
<#
.SYNOPSIS
Imports the dbatools module after trusting its code signing certificate.
.DESCRIPTION
This function checks if the dbatools module's signing certificate is trusted.
If not, it adds the certificate to the current user's Trusted Publishers store,
then imports the module. This is particularly useful when working with
AllSigned execution policies and the new Azure Trusted Signing certificate.
@potatoqualitee
potatoqualitee / Microsoft.Data.SqlClient.md
Created July 13, 2025 21:52 — forked from MartinHBA/Microsoft.Data.SqlClient.md
Microsoft.Data.SqlClient with PowerShell

Microsoft.Data.SqlClient with PowerShell

This is step by step guide how to use new .NET namespace Microsoft.Data.SqlClient with Powershell. I've tested connection string using SQL login and Windows login. This could not fit you all but might provide you some ideas.

Scenario

Fresh Windows Server 2016 in my case Azure VM.

  1. Install .NET CORE 3.0 SDK it must be SDK
@potatoqualitee
potatoqualitee / grpo_demo.py
Created February 3, 2025 20:03 — forked from willccbb/grpo_demo.py
GRPO Llama-1B
# train_grpo.py
import re
import torch
from datasets import load_dataset, Dataset
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import LoraConfig
from trl import GRPOConfig, GRPOTrainer
# Load and prep dataset
@potatoqualitee
potatoqualitee / new-development.json
Last active January 29, 2025 13:33
new-development.json
{
"New Developments": {
"keywords": {
"indicted party boss": {
"description": "Current trending topic",
"weight": 3,
"timestamp": "2025-01-29T00:05:14.7211272+00:00"
},
"urgent health care": {
"description": "Current trending topic",
@potatoqualitee
potatoqualitee / so.ps1
Last active August 22, 2024 10:15
Structured Objects in PowerShell using PSOpenAI
############# Install PSOpenAI and set your API key #############
Install-Module PSOpenAI
Import-Module PSOpenAI # only when it's first installed
$env:OPENAI_API_KEY = 'sk-xxxxxxxxxxxxxxxxxxxxxx'
############# Here's some markdown that'd be extracted from a PDF, however you want #############
$markdown = "# Dog Shot Record
2309 Kelley Road, Gulfport, MS, 39501
**CLINIC NAME**
Phone: 123-1234567 - Email: info@petshopname.com
@potatoqualitee
potatoqualitee / structured_objects.json
Last active August 20, 2024 08:45
structured objects
{
"name": "pet",
"strict": true,
"schema": {
"type": "object",
"properties": {
"pet_name": {
"type": "string",
"description": "What is the name of the pet?"
},