Skip to content

Instantly share code, notes, and snippets.

View pleabargain's full-sized avatar
🏠
office

Dennis pleabargain

🏠
office
View GitHub Profile
@pleabargain
pleabargain / gemtravel.txt
Created June 10, 2025 10:39
gemini gem travel planner prompt with emphasis on budget and maps
LLM Travel Assistant Instructions
Objective
The LLM should provide personalized travel assistance, including itinerary creation, map guidance, and budget planning, tailored to the user's preferences and constraints.
Core Functions
@pleabargain
pleabargain / compress-video.ps1
Created May 30, 2025 07:54
powershell check for ffmpeg then list all vid files in directory then prompt user to compress video
# Check if FFmpeg is installed
$ffmpegInstalled = Get-Command ffmpeg -ErrorAction SilentlyContinue
if (-not $ffmpegInstalled) {
Write-Host "FFmpeg is not installed or not found in PATH. Please install it before running this script."
exit
}
# Get all video files in the current directory
$videoFiles = Get-ChildItem -Filter *.mp4
@pleabargain
pleabargain / llamarunandsavelocally.ps
Created May 27, 2025 09:23
run llama 3.2 locally get prompt and save output to file locally
# Prompt user for the prompt to Llama3.2
$llamaPrompt = Read-Host "Enter your prompt for Llama3.2"
# Take the first 10 characters of the prompt and remove all spaces
$filename = ($llamaPrompt.Substring(0, [Math]::Min(10, $llamaPrompt.Length))).Replace(" ", "")
# Set the desktop path
$desktopPath = [System.IO.Path]::Combine($env:USERPROFILE, "Desktop")
$filePath = "$desktopPath\$filename.txt"
@pleabargain
pleabargain / Add-CursorEditContextMenu.ps1
Created February 10, 2025 18:57
right click ps1 open with cursor IDE
# Requires administrator privileges to modify registry
#Requires -RunAsAdministrator
# Script to add "Edit with Cursor" context menu for .ps1 files
try {
# Get Cursor installation path
$cursorPath = "$env:LOCALAPPDATA\Programs\cursor\Cursor.exe"
# Verify Cursor exists
@pleabargain
pleabargain / filerenamer.ps1
Created February 8, 2025 08:05
rename a bunch of files, remove white space with powershell
# Get all .docx files in the current directory
$files = Get-ChildItem -Filter "*.docx"
# Check if any files were found
if ($files.Count -eq 0) {
Write-Host "No .docx files found in the current directory."
exit
}
# Display current files
@pleabargain
pleabargain / combinepdf.ps1
Created February 6, 2025 10:42
combine multiple PDFS into one using powershell and qpdf on win11
# PDF Merger Script using QPDF
# This script allows user to select order of PDFs and combines them into a single PDF file
# Requirements: QPDF must be installed on the system
function Get-PdfPageCount {
param (
[string]$pdfPath
)
try {
$pageCount = & qpdf --show-npages $pdfPath 2>&1
@pleabargain
pleabargain / concatenatepdf.ps1
Created February 3, 2025 10:36
powershell script to concatenate PDF into user selected order requires chocolatey and qpdf to be installed
# Check if qpdf is installed
$qpdfCheck = Get-Command qpdf -ErrorAction SilentlyContinue
if (-not $qpdfCheck) {
Write-Host "QPDF is not installed. Please install it using: choco install qpdf"
Write-Host "If you don't have chocolatey installed, visit https://chocolatey.org/install"
exit
}
# Get all PDF files in current directory
$pdfFiles = Get-ChildItem -Path $PWD -Filter "*.pdf"
@pleabargain
pleabargain / prependpdfoneshot.ps1
Created February 3, 2025 10:24
powershell to prepend a name to all PDFs in a directory
# Get the current directory
$currentDir = Get-Location
# Get all PDF files in the current directory
$pdfFiles = Get-ChildItem -Path $currentDir -Filter "*.pdf"
# If no PDF files found, inform user and exit
if ($pdfFiles.Count -eq 0) {
Write-Host "No PDF files found in the current directory."
exit
@pleabargain
pleabargain / powershell-interactively-delete-ollama-models.ps1
Created January 31, 2025 06:48
powershell script to list and then prompt user to delete installed ollama models
# Ollama Model Manager Script
function Show-Models {
$models = ollama list
$index = 0
$models | ForEach-Object {
Write-Host "$($index): $_"
$index++
}
}
@pleabargain
pleabargain / gist:c3018173d740421b0e906db8aa0c939e
Created January 29, 2025 13:58
powershell using magick to zoom in and crop a photo to 2:3 ratio
Get-ChildItem -Path . -File | Where-Object { $_.Name -notmatch '\s' } | ForEach-Object {
$output = Join-Path $_.DirectoryName ($_.BaseName + "_cropped" + $_.Extension)
magick $_.FullName -gravity center -resize 130% -crop 2:3 +repage $output
}