Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
IFS=$'\n'
wget -O /tmp/rss https://feeds.fireside.fm/appelsenperenshow/rss
grep -B5 mp3 /tmp/rss|grep -E 'title|enclosure'|grep title|sed 's/<title>//g'|sed 's/<\/title>//g'|sed -e 's/^[ \t]*//' |sed 's/!//g'|sed 's/,//g'| sed "s/'//g" > /tmp/titles
grep -B5 mp3 /tmp/rss|grep -E 'title|enclosure'| grep mp3 |awk {'print $2'} |awk -F \" {'print $2'} > /tmp/mp3
paste -d \| /tmp/titles /tmp/mp3 > /tmp/alles
awk -F\| '{print "wget -O \x27" $1".mp3\x27" " " $2}' /tmp/alles > /tmp/downloadall.sh
@jan-vandenberg
jan-vandenberg / .vimrc
Last active June 9, 2023 18:51
.vimrc
syntax on
set nocompatible
" Fast finger fixes
command W w
command Wq wq
command WQ wq
" Start where you left off
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
@jan-vandenberg
jan-vandenberg / audiobook_maker.py
Created March 24, 2026 12:32
audiobook_maker.py
#!/usr/bin/env python3
"""
Audiobook Maker — EPUB/PDF naar MP3
Gebruikt edge-tts met Nederlandse Neural stemmen (gratis, geen API key nodig)
Installatie (eenmalig):
pip install edge-tts ebooklib beautifulsoup4 pypdf pydub
Gebruik:
python audiobook_maker.py mijnboek.epub

Static Multi-Year Web Gallery Generator

A zero-maintenance, high-performance Python script that reads a directory nested with local images sorted by category/year, compresses them into progressive optimized assets, and compiles a fast, fully responsive self-contained static HTML media gallery complete with lightbox viewing.

✨ Features

  • Nested Subfolder Aggregation: Turns multiple year directories into elegant categorized grids.
  • Smart Rebuild Caching: Leverages file-system timestamps and lightweight local JSON caches to avoid processing unmodified files.
  • Auto-Rotation & Transparency Handling: Cleans transparency masks from complex PNG assets and respects standard camera EXIF metadata rotation orientation.
  • Multi-Format Interoperability: Ingests standard .png, .jpg layouts, with complete native .heic pipeline conversion support (common for iOS iPhone images).
@jan-vandenberg
jan-vandenberg / replace-original-with-scaled.php
Created June 16, 2026 09:37
Replace links to original images with links to scaled images in WordPress published posts
<?php
require_once __DIR__ . '/wp-load.php';
global $wpdb;
$dry_run = true;
$only_post_id = null;
foreach ($argv as $arg) {
if ($arg === '--run') {
@jan-vandenberg
jan-vandenberg / Image-Audit-Readme.md
Last active June 18, 2026 09:59
WordPress Image Audit

WordPress Image Audit

A quarantine-first cleanup tool for old WordPress media libraries.

This project helps identify image files inside wp-content that are:

  • used
  • likely unused
  • uncertain / needs manual review