Skip to content

Instantly share code, notes, and snippets.

@victorespigares
victorespigares / transcribe.sh
Created January 18, 2026 22:43
Transcript video shell script. Use chunks for longer videos and local faster-wisper. Co-authored with Claude.
#!/usr/bin/env bash
set -euo pipefail
if [ $# -lt 1 ]; then
echo "Uso: $0 ruta/al/video.mp4"
exit 1
fi
VIDEO_PATH="$1"
if [ ! -f "$VIDEO_PATH" ]; then
@victorespigares
victorespigares / convert_rtf_plain.py
Last active January 10, 2026 19:55
Convert nvAlt RTF files into FSNotes Markdown via plain text. Needs textutil (macOS). Preserves timestamp, adds title tags in front matter.
#!/usr/bin/env python3
"""
Convert nvALT RTF notes to Markdown using textutil.
- Uses textutil for clean, fast conversion
- Extracts tags from filename [tag], converts to camelCase
- Escapes hashtags to prevent FSNotes tag interpretation
- Preserves file timestamps and original filename
- Only adds front matter if there are tags
"""
@victorespigares
victorespigares / api.py
Created January 6, 2012 01:04
This snippet shows how to bootstrap your Backbone models with Tastypie. If you're using 'api_name' for the URL of your api, make sure you add it to the Resource meta, otherwise 'resource_uri' will be empty when accessing from the view, but not from api ur
class CourseResource(ModelResource):
class Meta:
queryset = Course.objects.all()
resource_name = 'courses'
# without this resource_uri is empty in the view!
api_name = settings.API_VERSION