Skip to content

Instantly share code, notes, and snippets.

@vossisboss
vossisboss / gist:7fbd3444e9e55a271b7cdc1e0da9e79e
Created June 12, 2026 14:07
Example script for MacOS for converting static images to the webp format
#!/bin/bash
# convert-to-webp.sh
# Converts PNG/JPG/GIF/TIFF/BMP to WebP. Animated GIFs use gif2webp. Does not delete originals. The .webp versions are written alongside them.
# Skips: favicons, SVG, already-WebP files.
# Replace IMG_DIR file path from your project to use this script for your own stuff. This script should work on Linux as well but will need some modification for Windows.
IMG_DIR="${1:-wagtailio/static/img}"
QUALITY=85
METHOD=6
@vossisboss
vossisboss / build-wagtail-test-site.md
Created March 26, 2026 20:54
An agent skill for creating a test version of the Wagtail bakery demo for testing features and packages
name build-wagtail-test-site
description Plan and build a Wagtail test project for testing
license MIT

Build Wagtail Test Site

Overview

@vossisboss
vossisboss / 2025_wagtail_package_query.txt
Created November 20, 2025 21:24
BigQuery query for 2025 Wagtail package analysis
#standardSQL
CREATE TEMP FUNCTION toMarkdown(
name STRING,
version STRING,
home_page STRING,
project_urls ARRAY<STRING>)
RETURNS STRING
LANGUAGE js AS """
// Convert project_urls to map for easy access
const urls = {};
@vossisboss
vossisboss / maintainer_scrape.py
Last active November 20, 2025 21:20
Collecting maintainer user names from PyPI using a txt file of URLs
import requests
from bs4 import BeautifulSoup
import csv
import time
def scrape_user_links(url):
"""
Scrape all hyperlinks with href starting with /user/ from a PyPI page.
Args:
Now create a `base/blocks.py` file and add the following lines of code to it:
```python
from wagtail.blocks import (
CharBlock,
ChoiceBlock,
RichTextBlock,
StreamBlock,
StructBlock,
)
@vossisboss
vossisboss / urls.py
Created November 1, 2023 19:40
Example Django Headless URL configuration
# This code example was provided by Ed Rivas from Oddbird. You can find him on Github at https://github.com/jerivas/
# Ed says that jsreverse is a helper he finds useful that exposes Django URLs in JS. You can find that package here: https://pypi.org/project/django-js-reverse/
# Ed says the websocket settings are optional and only really needed if you have some realtime endpoints
# The most important part, according to Ed, is TemplateView at the bottom, which is a catchall for all requests that don't match the prior URLS and loads the frontend.
urlpatterns = [
path("admin/", admin.site.urls),