Skip to content

Instantly share code, notes, and snippets.

View sebastianrothbucher's full-sized avatar

Sebastian Rothbucher sebastianrothbucher

View GitHub Profile
alias pbcopy='xsel --clipboard --input'
alias pbpaste='xsel --clipboard --output'
@sebastianrothbucher
sebastianrothbucher / Makefile
Created June 13, 2026 16:50
Data-driven report in Typst (from CSV, could also be yaml/json)
estimates.pdf: estimates.typ
~/testdrive/typst/typst compile estimates.typ --root ..
// Full-bleed page
#set page(
paper: "a4",
margin: 0pt,
)
#let header-green = rgb("#4CAF50")
// Full-width header
#box(
you can tell #Claude to draft e-mails and send them out with just two clicks. Use a prompt like this one: "draft an email to sebastian@... asking for 30mins this week to discuss ... Use a mailto: link that I can just click that will open outlook, pre-populate subject, to and body". Claude will do as told: you get a link, click it, you have a full email with subject and message. Check if all is good, click send, DONE. Can also have it generate 5 (or 50) such links ;-) No more "Copilot can't..." b/c Claude just can (and the copy is better by a mile, too)
@sebastianrothbucher
sebastianrothbucher / gist:7c4c7fe39d0547f54d9a1bb0c66f0c01
Created June 5, 2026 12:51
Follow up reminders in Outlook (works for Gmail, too)
"I bcc myself and snooze the email."
source: https://www.reddit.com/r/Outlook/comments/1kbwzsk/comment/mq453df/
@sebastianrothbucher
sebastianrothbucher / gist:c98b3332a7af763768292a25e013f8d6
Created June 5, 2026 12:48
mailto: link via LibreOffice calc - once for bulk send (incl. pre-filled form) and once for form filled
=HYPERLINK(CONCAT("mailto:",B2,"?subject=",ENCODEURL("Reminder: Reg form"),"&body=",ENCODEURL(SUBSTITUTE(SUBSTITUTE($Sheet2.$A$1,"__NAME__",A2),"__LINK__",C2))))
=HYPERLINK(CONCAT("mailto:sebastianrothbucher@gmail.com?subject=",ENCODEURL(CONCAT("From ",B1)),"&body=",ENCODEURL(CONCAT(B1,";",B2))),"Click to Submit (Mail with CSV body)")
@sebastianrothbucher
sebastianrothbucher / agent.sql
Created May 31, 2026 19:39
Agent action log with postgres (i.e. track which action for which entity is open / done / failed) so next run knows
-- DROP SCHEMA agent;
CREATE SCHEMA agent AUTHORIZATION sebastianrothbucher;
-- agent.run_log definition
-- Drop table
-- DROP TABLE agent.run_log;
CREATE TABLE agent.run_log ( id uuid DEFAULT gen_random_uuid() NOT NULL, run_id text NOT NULL, entity_id text NOT NULL, "action" text NOT NULL, status text DEFAULT 'pending'::text NOT NULL, payload jsonb DEFAULT '{}'::jsonb NULL, created_at timestamptz DEFAULT now() NULL, updated_at timestamptz DEFAULT now() NULL, CONSTRAINT run_log_entity_action_unique UNIQUE (entity_id, action), CONSTRAINT run_log_pkey PRIMARY KEY (id), CONSTRAINT run_log_status_check CHECK ((status = ANY (ARRAY['pending'::text, 'done'::text, 'failed'::text]))));
@sebastianrothbucher
sebastianrothbucher / extract-pdf-form.py
Created May 31, 2026 12:42
Extract fields from PDF form as JSON
#!/usr/bin/env python3
"""
Extract all form fields from a PDF and output them as JSON to stdout.
Usage:
python extract_pdf_fields.py <filename.pdf>
Dependencies:
pip install pypdf
"""
@sebastianrothbucher
sebastianrothbucher / start.sh
Created January 3, 2026 15:13
MSSQL start script
#!/bin/bash
docker run --name mssqlrest -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=my$ecretPassword' -p 1433:1433 -d mcr.microsoft.com/azure-sql-edge
@sebastianrothbucher
sebastianrothbucher / start.sh
Created January 3, 2026 15:12
fake-smtp-server start script
#!/bin/bash
SERVER_ADDRESS=127.0.0.1 SERVER_PORT=8088 MANAGEMENT_SERVER_ADDRESS=127.0.0.1 MANAGEMENT_SERVER_PORT=8089 FAKESMTP_BIND_ADDRESS=127.0.0.1 /opt/homebrew/Cellar/openjdk/22.0.2/bin/java -jar fake-smtp-server-2.5.0.jar