Several ways to execute a standalone script inside a Django project environment, including shell redirection and a custom management command.
A Chrome Extension to Prevent Accidentally Closing YouTube Music
A small Chrome extension that injects code into YouTube Music to help avoid accidentally closing the app window.
Rotate and Compress audit Logs Daily
Configure auditd to stop rotating by size and use a daily cron job to rotate, rename, compress, and prune audit logs by time.
Get Celery Queue Length and Purge a Queue
Query RabbitMQ queue length through Celery and Kombu, and purge a queue when needed.
Generate Django Model Choices Dynamically
Avoid creating new migrations every time a choices list changes by generating model choices from a helper function.
A Simple Fix for Django "unable to read data" with pgpool2
If pgpool2 closes idle client connections before Django notices, manually closing Django DB connections can avoid OperationalError in long-running tasks.
Prevent Celery from Hanging When the Broker Is Down
Use broker_transport_options to limit producer retry behavior so apply_async and delay do not hang indefinitely when the broker is unavailable.
How to Release Pressure on a Bosch Wall-Mounted Water Heater
A personal step-by-step note on lowering pressure on a Bosch wall-mounted gas water heater after the pressure gauge climbed too high.
Fix UnicodeDecodeError When Running a Python Script over SSH
If a remote Python 3 script fails with UnicodeDecodeError over SSH, mismatched locale environment variables between client and server may be the cause.
Use uWSGI Spooler as a Simple Async Queue
Build a lightweight asynchronous task queue with uWSGI's built-in spooler instead of introducing Celery, RabbitMQ, or Redis.