Skip to content

Instantly share code, notes, and snippets.

View sebastianrothbucher's full-sized avatar

Sebastian Rothbucher sebastianrothbucher

View GitHub Profile
@sebastianrothbucher
sebastianrothbucher / run.sh
Created January 3, 2026 15:12
dynamodb-local start script
#!/bin/sh
java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb
@sebastianrothbucher
sebastianrothbucher / start.sh
Created January 3, 2026 15:09
keycloak start script
#!/bin/bash
./bin/kc.sh start-dev --http-host=127.0.0.1
@sebastianrothbucher
sebastianrothbucher / start.sh
Created January 3, 2026 15:07
n8n start script
#!/bin/bash
. ~/.nvm/nvm.sh
nvm use 24
NODES_EXCLUDE="[]" N8N_LISTEN_ADDRESS=127.0.0.1 npx n8n@2.1.4
@sebastianrothbucher
sebastianrothbucher / Task & Form final.json
Last active June 9, 2026 21:26
n8n task & form - distribute jobs (here: Google Tasks - anything works) & have ppl. fill _individual_ form & work with results
{
"name": "Task & Form",
"nodes": [
{
"parameters": {
"content": "## Task & Form\n\n### How it works\n\n1. Trigger the workflow using a webhook.\n2. Set the website to be reviewed.\n3. Create a task in Google Tasks.\n4. Wait for feedback using a web form.\n5. Decide if the task should be added to a shortlist.\n6. Perform an additional action based on the shortlist decision.\n\n### Setup steps\n\n- [ ] Configure Google Tasks credentials.\n- [ ] Set up the webhook URL for the trigger.\n- [ ] Customize the feedback form in the wait node.\n\n### Customization\n\nThe workflow can be customized by changing the conditions in the 'shortlist?' node.\n\n### Some background: Why?\nWhen getting many AI results for review, it becomes hard to keep track if it's just in slack or mail. Also, it's harder to distribute work. Still, you'll want to keep n8n as the workflow engine, asking me for OK before resuming its magic. Using an external tool for managing the backlog of human tasks keeps things manageab
@sebastianrothbucher
sebastianrothbucher / pg4all.txt
Last active August 17, 2025 18:37
PG extensions - PG 4 all!
https://github.com/pgaudit/pgaudit
https://github.com/citusdata/pg_cron
https://github.com/pgvector/pgvector
https://github.com/pgmq/pgmq
https://github.com/Olshansk/postgres_for_everything
@sebastianrothbucher
sebastianrothbucher / content.xml
Last active August 9, 2025 13:25
Libreoffice odt is a ZIP - i.e. one can read forms - see form fields: content is right there. Better than manual (and better than editing custom doc props); can e.g. create an automator on Mac to xtract. Can also write-protect all but form in doc proprties. Also saves money vis-a-vis dumping it all into ChatGPT/Claude in order to get a table
<?xml version="1.0" encoding="UTF-8"?>
<office:document-content xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart
@sebastianrothbucher
sebastianrothbucher / cell.py
Last active August 19, 2025 11:23
Jupyter HTML and several displays - just store for once
import pandas as pd
from IPython.core.display import HTML
# display several
display("one")
display(pd.DataFrame({"a": [1, 2]}))
print("two-a")
display(HTML('<em style="color: hotpink">two-b</em><a href="https://bla">Link gets rendered in PDF</a>'))
display("two-c")
@sebastianrothbucher
sebastianrothbucher / pg-insert-missing.sql
Last active January 18, 2025 18:07
Postgres - insert missing and ignore dups -
CREATE TABLE public.test (
id int4 NOT NULL,
"text" text NULL,
CONSTRAINT test_pkey PRIMARY KEY (id)
);
insert into test (id, text) values (1, 'hey'), (2, 'ho') on conflict do nothing;
insert into test (id, text) values (2, 'hoo'), (3, 'whatever') on conflict do nothing;
-- result: 1/hey, 2/ho, 3/whatever inserted - perfect: minimum # statements, exactly what's wanted: just fill in missing
@sebastianrothbucher
sebastianrothbucher / combine.tex
Last active August 19, 2025 11:24
All PDF manipulations - nice and open src (pypdf would be an alternative - see below)
\documentclass{article}
\usepackage{pdfpages}
\usepackage{background}
\backgroundsetup{scale = 1, angle = 0, opacity = 1,
contents = {\includegraphics[width = \paperwidth,
height = \paperheight, keepaspectratio]
{testbriefkopf.pdf}}}
% for different, we can have two steps: first background, then merge
\begin{document}
\includepdf[pages=-]{dinbrief2.pdf}
@sebastianrothbucher
sebastianrothbucher / flow.json
Created August 3, 2024 18:01
Simulating a sine curve and sudden drop via Node-Red
[
{
"id": "91450f41b1eae9c6",
"type": "inject",
"z": "426169ba36026cef",
"name": "on",
"props": [
{
"p": "payload"
},