Skip to content

Instantly share code, notes, and snippets.

View vt-idiot's full-sized avatar
🏴‍☠️

vt-idiot

🏴‍☠️
View GitHub Profile
@vt-idiot
vt-idiot / catboxalbum.ps1
Created March 18, 2023 15:44
Upload Catbox Album
<#
.Description
an idiot's catbox album uploader v0.1
.PARAMETER DirectoryPath
Where da files at? Script will upload all PNGs in the folder you point it at!
.PARAMETER UserHash
Your catbox userhash. If not specified, your albums cannot be edited or deleted after uploading.
.PARAMETER Title
Sets the title for your album, defaults to "Title" if not specified.
.PARAMETER Description
@vt-idiot
vt-idiot / catbox.ps1
Created February 14, 2023 00:45
Catbox Script for s0hv/foo_discord_rich
<#usage: use the following line as your command in the foobar2000 plugin
pwsh.exe C:\Path\To\catbox.ps1
note: doesn't work right on PowerShell 5 "powershell.exe", you need PowerShell 7#>
$upload = Resolve-Path -LiteralPath $input | Select-Object -ExpandProperty Path
$uri = "https://catbox.moe/user/api.php"
$body = @{
"reqtype"="fileupload"
"fileToUpload"=Get-Item $upload
}
Invoke-WebRequest -Uri $uri -Method POST -Form $body | Select-Object -ExpandProperty Content
@vt-idiot
vt-idiot / Insanity.ps1
Last active June 28, 2023 04:03
an insane man's script to convert NovelAI and stable-diffusion-webui images to JPG while preserving metadata and file creation/modification dates
<#
.Description
PROOMPT PRESSER 1.3
.PARAMETER Delete
Permenantly erase all input PNGs. Default behavior does not delete input PNGs.
.PARAMETER Recurse
Process subdirectories. Default behavior only processes working directory.
.PARAMETER Quality
JPEG compression level. Defaults to 88 if unset.
.PARAMETER TXT