Skip to content

Instantly share code, notes, and snippets.

View potatoqualitee's full-sized avatar
big permz energy

Chrissy LeMaire potatoqualitee

big permz energy
View GitHub Profile
@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: [email protected]
@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?"
},
@potatoqualitee
potatoqualitee / style.css
Created July 25, 2024 13:49
asciidoc.css for vscode
/*! Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */
/* Uncomment the following line when using as a custom stylesheet */
@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700";
html {
font-family: sans-serif;
-webkit-text-size-adjust: 100%
}

To use the DCLM-7B model on Jan.ai, follow these steps:

  1. Install the Required Tools: Ensure you have the necessary tools installed. You might need packages like transformers and open_lm. You can install them using:

    pip install git+https://github.com/mlfoundations/open_lm.git transformers
  2. Download the Model: Integrate the DCLM-7B model from Hugging Face with Jan.ai: