Skip to content

Instantly share code, notes, and snippets.

View roelven's full-sized avatar

Roel van der Ven roelven

View GitHub Profile
@roelven
roelven / download_images.py
Created January 22, 2026 13:36
WordPress to Hugo image downloader - downloads all images from markdown files and updates references
#!/usr/bin/env python3
"""
Download all images from markdown files and update references for Hugo migration.
"""
import os
import re
import sys
from pathlib import Path
from urllib.parse import urlparse, unquote
@roelven
roelven / call-sora.sh
Created January 10, 2026 14:03
Bash CLI wrapper for OpenAI Sora 2 video generation API
#!/usr/bin/env bash
# Simple CLI for OpenAI Sora 2 video generation.
# Requirements: bash, curl, jq
# Usage examples at bottom.
set -euo pipefail
# Load environment variables from .env file if it exists
if [[ -f "$(dirname "$0")/.env" ]]; then
set -a
@roelven
roelven / obsidian-session-hook.md
Last active January 11, 2026 13:44
Claude Code SessionEnd hook for generating Obsidian project summaries

Claude Code Obsidian Summary Command

A UserPromptSubmit hook for Claude Code that generates concise project summaries in your Obsidian vault when you type obsidian-summary.

What It Does

When you type obsidian-summary during a Claude Code session, Claude will:

  • Analyze the session to extract project details
  • Determine the project/tool name
  • Summarize what was built in bullet points
@roelven
roelven / Dockerfile
Last active December 20, 2025 12:26
Example Agent Yolo Loop - Run a loop so that an LLM agent can iterate on your code
FROM node:18-bullseye
# Install tooling
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
git \
ca-certificates \
bash && \
rm -rf /var/lib/apt/lists/*
@roelven
roelven / README.md
Created December 20, 2025 12:04
yt-migrate — migrate your Youtube playlists and liked videos from one account to another

yt-migrate

A pragmatic, script-based migration tool to move personal YouTube data between two Google accounts using the official YouTube Data API v3.

This exists because Google does not provide a first-class way to migrate user-level YouTube data (subscriptions, playlists, likes) between accounts, especially when Brand Accounts are not an option.

The script is designed to be:

  • Explicit about what is and is not possible
  • Safe to re-run (resume-friendly)
  • API- and ToS-compliant (no scraping)
@roelven
roelven / README.md
Last active December 15, 2025 09:05
Paperless-ngx network scan --> Signal message with direct link

Receive a Signal notification when your scan is ready

Powered by Paperlessg-ngx

Great for Paperless users that have printer that scan to a network folder. Quickly scanning a document and getting the link to its PDF is now super fast and low effort!

Paperless

Mount the local /scripts directory as a volume in your docker-compose.yml for the webserver container:

@roelven
roelven / ha_samsung_frame_instructions.md
Last active November 4, 2025 12:25
Set up your Samsung Frame TV with correct status tracking in Home Assistant

Set up your Samsung Frame TV with correct status tracking in Home Assistant

  1. Set up your TV + connect it to your LAN
  2. Install the HA Samsung Smartthings integration
    • Make sure to connect it to your Samsung account, so that the integration will automatically provide the auth token in the next step.
    • Read more here
  3. Install ha-samsungtv-smart using HACS
  4. Configure the integration, make sure to turn your TV on as you'll need to approve this on your Frame.
  5. Add the following snippet to your HA configuration.yaml:
@roelven
roelven / call-sora.sh
Created October 24, 2025 13:59
Generate Sora 2 videos by calling the API directly.
#!/usr/bin/env bash
# Simple CLI for OpenAI Sora 2 video generation.
# Requirements: bash, curl, jq
# Usage examples at bottom.
set -euo pipefail
API_BASE="${OPENAI_API_BASE:-https://api.openai.com}"
API_KEY="YOUR_API_KEY"
MODEL="${MODEL:-sora-2}" # or "sora-2-pro"
@roelven
roelven / improve_prompt.sh
Last active October 9, 2025 12:14
Prompt my prompt: a Raycast script to improve your prompts.
#!/bin/bash
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Prompt my prompt
# @raycast.mode silent
# Optional parameters:
# @raycast.icon 🤖
# @raycast.packageName Prompt Tools
@roelven
roelven / bootstrap.sh
Created October 4, 2025 14:13
Agentic / CLI development in an isolated VM using Proxmox
# bootstrap_devbox.sh (Ubuntu 24.04 LTS)
# Run once as root: sudo bash /tmp/bootstrap_devbox.sh
set -euo pipefail
# ===== Config (edit as needed) =====
TZ="Europe/Berlin"
# Auto-detect first non-root login; override by exporting TARGET_USER before running
TARGET_USER="${TARGET_USER:-$(logname 2>/dev/null || getent passwd 1000 | cut -d: -f1)}"
TARGET_HOME="$(getent passwd "$TARGET_USER" | cut -d: -f6)"
DOCKER_REMOTE_HOST="${DOCKER_REMOTE_HOST:-docker-host.local}" # e.g., docker-host.lan