Skip to content

Instantly share code, notes, and snippets.

View pleabargain's full-sized avatar
🏠
office

Dennis pleabargain

🏠
office
View GitHub Profile
@pleabargain
pleabargain / clone.ps1
Created November 6, 2026 13:21
Clone a website using PowerShell.
"""Mirror a website into a local folder for offline browsing."""
import os
import re
import sys
import time
import urllib.parse as up
import requests
from bs4 import BeautifulSoup
@pleabargain
pleabargain / share.js
Created November 4, 2026 06:12
bookmark in chrome to share to almost any web platform
javascript:(()=>{const I='olshare';let o=document.getElementById(I);if(o){o.remove();return}const u=location.href,t=document.title,e=encodeURIComponent,U=e(u),T=e(t);const L=[['Telegram','https://t.me/share/url?url='+U+'&text='+T],['WhatsApp','https://wa.me/?text='+e(t+' '+u)],['Email','mailto:?subject='+T+'&body='+U],['LinkedIn','https://www.linkedin.com/sharing/share-offsite/?url='+U],['Copy link','']];o=document.createElement('div');o.id=I;o.style.cssText='position:fixed;top:20px;right:20px;z-index:2147483647;background:#fff;color:#202124;border-radius:12px;box-shadow:0 4px 24px rgba(0,0,0,.3);padding:12px;font:14px Arial,sans-serif;display:flex;flex-direction:column;gap:6px;min-width:180px';const h=document.createElement('div');h.textContent='Share this page';h.style.cssText='font-weight:bold;margin-bottom:4px';o.appendChild(h);const k=v=>{if(v.key==='Escape')c()};const c=()=>{o.remove();document.removeEventListener('keydown',k)};const B=(n,f)=>{const b=document.createElement('button');b.textContent=n;b.s
@pleabargain
pleabargain / Summit-Interest-google-form.gs
Created November 3, 2026 08:27
Google Apps form to submit applications for a startup conference modify it to your needs.
/**
* --------------------------------------------------------------
* Google Apps Script – Build a “Summit Interest” Google Form
* --------------------------------------------------------------
* 1️⃣ Run createSummitForm() once – it will create the form and
* return the edit URL in the logger.
* 2️⃣ The script uses FormApp (the Forms service) only – no
* external libraries required.
* 3️⃣ All references to "Doers" have been removed.
* --------------------------------------------------------------
@pleabargain
pleabargain / get-volunteers.gs
Created October 30, 2026 06:30
Generic Google Form, Google App Script to get volunteers, and they will get a follow-up email.
/**
* GENERIC Google Apps Script: role-volunteer sign-up form.
*
* Creates a Google Form that recruits exactly one volunteer per role,
* removes each role as it's claimed, auto-closes once full, and emails
* every volunteer a confirmation with prep materials.
*
* HOW TO USE
* 1. Edit the CONFIG block below for your own event/roles.
* 2. Go to https://script.google.com, create a new project, paste this
@pleabargain
pleabargain / lemonde-server-sanity.py
Created October 25, 2026 08:51
lemonade server sanity test in python
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "httpx",
# ]
# ///
import sys
import httpx
@pleabargain
pleabargain / AHK-paste-buffer-image-url.ahk
Created September 10, 2026 05:21
Auto hot key to grab the last screen shot in buffer as a URL for copying pasting the URL
; Ctrl+Shift+I → copy latest screenshot full path to clipboard
; AutoHotkey v2
ScreenshotDir := "C:\Users\denni\OneDrive\Pictures\Screenshots 1"
^+i:: {
global ScreenshotDir
if !DirExist(ScreenshotDir) {
TrayTip("Latest Screenshot", "Directory not found:`n" . ScreenshotDir, 3)
return
@pleabargain
pleabargain / looping-ollama.py
Created August 5, 2026 10:51
Standalone UV script: validates local-LLM structured JSON, then retries with errors fed back until the output converges (or attempts are exhausted).
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "jsonschema>=4.26.0",
# "ollama>=0.6.2",
# ]
# ///
"""Ollama JSON Schema & Date Retry Demo
@pleabargain
pleabargain / gist:a2a5c11fc3854c4b40f7a8f7734039d2
Created July 16, 2026 07:18
this script will delete VS code from your machine using winget
<#
.SYNOPSIS
Uninstalls Visual Studio Code and removes leftover configuration/extension folders.
.DESCRIPTION
This script attempts to uninstall Visual Studio Code using winget first. If winget
is unavailable or the uninstall fails (e.g. VS Code wasn't installed via winget),
it falls back to locating the uninstaller via the Windows registry (checking both
per-user and machine-wide uninstall keys, including the 32-bit WOW6432Node hive).
@pleabargain
pleabargain / uv-run.py
Last active May 6, 2026 07:57
uv python one liner to concatenate all numbered pdfs into one new pdf
uv run --with pypdf python -c "import os; from pypdf import PdfWriter; writer = PdfWriter(); [writer.append(f) for f in sorted(os.listdir('.')) if f.lower().endswith('.pdf') and f != 'Merged_Document.pdf']; writer.write('Merged_Document.pdf')"
@pleabargain
pleabargain / docx-to-md.ps1
Created April 11, 2026 03:39
converts all docx to md in a directory win11 requires pwsh and pandoc
#Requires -Version 5.1
<#
.SYNOPSIS
Convert every *.docx in the current directory to Markdown using Pandoc.
.DESCRIPTION
- Non-recursive: only the working directory (Get-Location), not subfolders.
- Output: <BaseName>.md if that file does not exist; otherwise <BaseName>-1.md,
<BaseName>-2.md, ... until an unused name is found.
- Embedded images and media are extracted to <Stem>_media next to the .md file,