Linux create boot disk ubuntu create boot disk ubuntu python sudo umount /dev/sdX sudo dd if=/path/to/ubuntu.iso of=/dev/sdX bs=4M && sync Feb 16, 2021 python
Linux Execute cron job every one minute with log file Execute cron job every one minute with log file python */1 * * * * /path/to/script.sh > /path/to/log.txt 2>&1 Apr 28, 2020 python
Linux postgresql clean wal files script postgresql clean wal files script javascript #!/bin/bash ARCHIVEDIR='/var/lib/postgresql/10/main/pg_wal' LAST_BACKUP=$(ls -lto ${ARCHIVEDIR}) cd $ARCHIVEDIR exec "/usr/bin/pg_archivecleanup" -d -n /var/lib/postgresql/10/main/pg_wal ${LAST_BACKUP} | find $ARCHIVEDIR -type f -mmin +5 -delete Dec 19, 2019 javascript
Linux daphne asgi supervisor conf daphne asgi supervisor conf python [program:project_asgi_daphne] directory=/path/to/project/project command=/path/to/project/env/bin/daphne -u /path/to/project_asgi.sock project.asgi:application stdout_logfile=/path/to/daphne.log stderr_logfile=/path/to/daphne_stderr.log autostart=true Dec 15, 2019 python
Linux Gunicorn example conf gunicorn example conf python [program:project] command=/path/to/env/bin/gunicorn --workers 3 --bind unix:/path/to/project.sock project.wsgi directory=/path/to/project/project autostart=true autorestart=true stderr_logfile=/var/log/project.err.log stdout_logfile=/var/log/project.out.log Dec 12, 2019 python