Skip to content

Instantly share code, notes, and snippets.

View synapse-compress.sh
#!/bin/bash
# All thanks to https://levans.fr/shrink-synapse-database.html
# adapt as needed
API_TOKEN=<ADD API TOKEN>
HOST=http://localhost:8008
ROOMLIMIT=10000
PSQL_SYSTEM_USER=postgres
PSQL_USER=synapse
View matrix-stats.py
import argparse
import resource
import aiohttp
import aiodns
import asyncio
from collections import Counter
import datetime