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 / Export-FileIcon.ps1
Created January 29, 2020 21:22
Export-FileIcon.ps1
Function Export-FileIcon {
<#
.SYNOPSIS
Export-FileIcon exports high-quality icons stored within .DLL and .EXE files.
.DESCRIPTION
Export-FileIcon exports high-quality icons stored within .DLL and .EXE files. The function can export to a number of formats, including
ico, bmp, png, jpg, gif, emf, exif, icon, tiff, and wmf. In addition, it can also export to a different size.
@potatoqualitee
potatoqualitee / function-calling.ipynb
Created April 22, 2024 21:06 — forked from kylemcdonald/function-calling.ipynb
Example of OpenAI function calling API to extract data from LAPD newsroom articles.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@potatoqualitee
potatoqualitee / function_calling.json
Created April 21, 2024 20:53
function_calling.json
[
{
"type": "function",
"function": {
"name": "Invoke-DbaQuery",
"description": "Use this function to answer user questions about Northwind. Input should be a fully formed SQL query.",
"parameters": {
"properties": {
"Query": {
"type": "string",
@potatoqualitee
potatoqualitee / bean-labeler.ts
Created March 16, 2024 20:09 — forked from haileyok/bean-labeler.ts
Bean Auto Labeler
import {
AppBskyEmbedImages,
AppBskyFeedPost,
BskyAgent,
} from '@atproto/api'
import * as dotenv from 'dotenv'
import {ComAtprotoSyncSubscribeRepos, subscribeRepos, SubscribeReposMessage} from 'atproto-firehose'
import Anthropic from '@anthropic-ai/sdk'
import axios from 'axios'
Begin trace logging for SharePoint Products Configuration Wizard. Version 16.0.14326.20450
11/29/2023 13:20:01 1 INF Entering function PsconfigUserInterfaceMain.Main
11/29/2023 13:20:01 1 INF Entering function Common.SetCurrentThreadCultureToInstalledCulture
11/29/2023 13:20:01 1 INF Entering function Common.SetThreadCultureToInstalledCulture
11/29/2023 13:20:01 1 INF Current thread culture is English (United States), current thread ui culture is English (United States), installed culture is English (United States)
11/29/2023 13:20:01 1 INF Leaving function Common.SetThreadCultureToInstalledCulture
11/29/2023 13:20:01 1 INF The current ui culture English (United States) is NOT right to left
11/29/2023 13:20:01 1 INF Leaving function Common.SetCurrentThreadCultureToInstalledCulture
11/29/2023 13:20:01 1 INF Creating the psconfig application context
11/29/2023 13:20:01 1 INF Entering function PsconfigApplicationContext.PsconfigApplicationContext
@potatoqualitee
potatoqualitee / settings.json
Created July 23, 2020 14:16
My Windows Terminal Preview settings.json File
// This file was initially generated by Windows Terminal Preview 1.1.1812.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@potatoqualitee
potatoqualitee / Get-Duplicates.ps1
Last active October 24, 2023 22:00
Get Duplicates from PowerShell Datatable using LINQ
# Create Datatable
$dt = New-Object System.Data.Datatable "Music"
[void]$dt.Columns.Add("Artist")
[void]$dt.Columns.Add("Genre")
[void]$dt.Columns.Add("Album")
[void]$dt.Columns.Add("ReleaseYear")
# Add data
[void]$dt.Rows.Add("Poison","Glam Metal","Open Up and Say... Ahh!",1988)
[void]$dt.Rows.Add("Cinderella","Night Songs","Flesh &amp; Blood",1986)
@potatoqualitee
potatoqualitee / ZInstall-KBUpdate.ps1
Last active September 29, 2023 23:06
Installing KB Updates on Remote System, 5 day dev journal
# THIS HASN'T BEEN ADDED TO THE KBUPDATE REPO YET BUT WILL BE WHEN I GET A MOMENT
function Install-KbPatch {
<#
.SYNOPSIS
Installs KBs on local and remote servers on Windows-based systems
.DESCRIPTION
Installs KBs on local and remote servers on Windows-based systems
PowerShell 5.1 must be installed and enabled on the target machine and the target machine must be Windows-based
@potatoqualitee
potatoqualitee / Convert-Pfx.ps1
Last active September 29, 2023 23:05
Convert-Pfx
function Convert-Pfx {
<#
.SYNOPSIS
Converts PFX to .cer and .key
.DESCRIPTION
Converts PFX to .cer and .key
Requires openssl
@potatoqualitee
potatoqualitee / Save-KBFile.ps1
Last active August 12, 2023 16:00
Download Windows patch files / KB (patchid like KBxxxxx) and save them to disk using PowerShell
function Save-KBFile {
<#
.SYNOPSIS
Downloads patches from Microsoft
.DESCRIPTION
Downloads patches from Microsoft
.PARAMETER Name
The KB name or number. For example, KB4057119 or 4057119.