Skip to content

Instantly share code, notes, and snippets.

View masterflitzer's full-sized avatar

masterflitzer

  • 12:30 (UTC +02:00)
View GitHub Profile
@masterflitzer
masterflitzer / provadis-coach-download-files.js
Last active March 2, 2023 08:19
Provadis Coach: Download all files of current dir (bookmarklet)
(() => {
"use strict";
if (document.readyState !== "complete") {
globalThis.addEventListener("load", () => main());
} else main();
async function main() {
const fileTuples = Array.from(
document.querySelector("#filelist").tBodies[0].children
@masterflitzer
masterflitzer / settings.json
Last active March 13, 2023 19:41
Visual Studio Code Settings (v1.76.1)
{
"[bat]": {
"files.eol": "\r\n"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[dockercompose]": {
"editor.defaultFormatter": "ms-azuretools.vscode-docker"
},
@masterflitzer
masterflitzer / README.md
Last active June 25, 2023 15:14
HelloFresh: Download all recipes of your past deliveries (bookmarklet)

HelloFresh Recipe Downloader

  • Go to past deliveries on HelloFresh: US | DE
  • Create a bookmark in your browser and paste javascript: followed by the minified code into the URL input field (Bookmarklet)
  • Alternatively: Open the browser DevTools (F12) and paste the code into the console

Minify

terser --compress --mangle --output hellofresh-recipe-downloader.min.js hellofresh-recipe-downloader.js
@masterflitzer
masterflitzer / ics-filter.py
Last active March 2, 2023 08:43
Simple script to filter or filter out events of an ics file based on their name (summary) using regex
#!/usr/bin/env python3
from ics import Calendar
import argparse
import re
import sys
def main():
@masterflitzer
masterflitzer / github-unverified-commits.js
Last active March 2, 2023 08:22
Find unverified commits in your GitHub repositories
import { writeFile } from "fs/promises";
import { Octokit } from "octokit";
import ProxyAgent from "proxy-agent";
const apiToken = process.env.API_TOKEN;
const output = process.argv[2] ?? "-";
if (apiToken == null) {
console.error("API_TOKEN was empty!");
console.info("Please set the API_TOKEN environment variable:");
@masterflitzer
masterflitzer / battery-log.ps1
Created March 13, 2023 19:32
Log current battery charge on Windows
while ($true) {
$charge = Get-CimInstance -ClassName Win32_Battery | Select-Object -ExpandProperty EstimatedChargeRemaining
Write-Output "Current Charge: ${charge}%" | Tee-Object -Append "$([System.Environment]::GetFolderPath("Desktop"))/battery.log"
Start-Sleep -Seconds 30
}
@masterflitzer
masterflitzer / ffmpeg.sh
Last active June 22, 2024 06:38
Convert any movie to WebM (AV1/Opus/WebVTT)
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
shopt -s inherit_errexit
# e.g. "Movie name (Year)" or "Series name (Year) - S01E01 - Episode title"
TITLE="${TITLE:-}"
DESCRIPTION="${DESCRIPTION:-}"
@masterflitzer
masterflitzer / compile-ffmpeg-debian.sh
Last active April 15, 2024 04:01
Compile ffmpeg on Debian
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
shopt -s inherit_errexit
if test -z "${FFMPEG_VERSION:-}"
then
echo "You need to set the FFMPEG_VERSION environment variable (see https://git.ffmpeg.org/gitweb/ffmpeg.git/tags)"
@masterflitzer
masterflitzer / README.md
Last active November 29, 2023 15:41
Make ChatGPT window wider

ChatGPT Wide

  • Open a chat on ChatGPT
  • Create a bookmark in your browser and paste javascript: followed by the minified code into the URL input field (Bookmarklet)
  • Alternatively: Open the browser DevTools (F12) and paste the code into the console

Minify

terser --compress --mangle --output chatgpt-wide.min.js chatgpt-wide.js
@masterflitzer
masterflitzer / email-multiplexer.py
Last active November 26, 2023 20:13
Send E-Mail from IMAP to multiple recipients over SMTP
#!/usr/bin/env python3
import os
import toml
from email import message_from_bytes, policy
from email.message import EmailMessage
from enum import Enum
from html import escape
from imaplib import IMAP4, IMAP4_SSL
from smtplib import SMTP, SMTP_SSL