Skip to content

Instantly share code, notes, and snippets.

View Xetera's full-sized avatar

Xetera

View GitHub Profile
@Xetera
Xetera / xseed-usenet.py
Last active June 26, 2025 08:21
A cross-seeding script to go through radarr's import history and hardlink movies downloaded from usenet with their original titles
#! /usr/bin/env python3
import requests
import os
import pathlib
RADARR_TOKEN = os.environ.get("RADARR_TOKEN")
# directory where hardlinks will be created for renaming purposes
HARDLINK_TARGET = os.environ.get("HARDLINK_TARGET")
# DRY_RUN=true to test without touching the filesystem
DRY_RUN = os.environ.get("DRY_RUN", "false").lower() == "true"
@Xetera
Xetera / xseed-sonarr.py
Created February 16, 2024 00:54
Script for hardlinking usenet imports in sonarr into a separate folder with its original download name
#! /usr/bin/env python3
import requests
import os
import pathlib
SONARR_TOKEN = os.environ.get("SONARR_TOKEN")
# directory where hardlinks will be created for renaming purposes
HARDLINK_TARGET = os.environ.get("HARDLINK_TARGET")
# DRY_RUN=true to test without touching the filesystem
DRY_RUN = os.environ.get("DRY_RUN", "false").lower() == "true"
@Xetera
Xetera / gyazo_hydration.go
Created November 14, 2025 15:43
Gyazo's PRO data export does NOT properly include the created at field for the images you download. This script restores that data back into the images given they're all in the same folder and that you have an api key.
// Yes this is vibe coded. It worked fine for me
package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"os"
"path/filepath"
@Xetera
Xetera / supabase_dump.md
Last active November 25, 2025 14:28
Dumping from supabase and restoring on local postgres

Restoring a supabase dump to local postgres

Supabase contains a ton of extra schemas, roles and extensions that prevents restoring a local db from a supabase db. There are some tools out there but thery're all tedious to use. Here's how you can do it with a single pg_dump command

pg_dump --exclude-schema graphql --exclude-schema auth --exclude-schema graphql_public \
  --exclude-schema pgsodium --exclude-schema pgbouncer --exclude-schema storage \
  --exclude-schema realtime --exclude-schema vault --exclude-extension pgsodium \
 --exclude-extension pg_graphql --exclude-extension supabase_vault \