apt update
apt upgrade
apt install wireguard
cd /etc/wireguard
umask 077
wg genkey | tee server.priv | wg pubkey > server.pub
[[inputs.http]] | |
name_override = "opendtu" | |
urls = [ | |
"http://opendtu.example.com/api/livedata/status?inv=123456788", # Inverter 1 | |
"http://opendtu.example.com/api/livedata/status?inv=123456789", # Inverter 2 | |
] | |
data_format = "json_v2" | |
[[inputs.http.json_v2]] | |
[[inputs.http.json_v2.tag]] | |
path = "inverters.0.serial" |
This all refers to PostgreSQL, on other databases it will probably be different.
-
Create the new User model as an exact copy of
django.contrib.auth.models.User
(we assume it will beuser.User
then) -
Create the migrations and commit them
-
Run the following SQL to simulate that the migration has run
SELECT * FROM django_migrations_id_seq;
Beispiel, t.amp TSA 4-700
Warnung, dieses Dokument dient aktuell dazu die Ueberlegungen niederzuschreiben um sie zu pruefen, es ist moeglicherweise nicht korrekt.
#!/usr/bin/env python | |
# | |
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
# Version 2, December 2004 | |
# | |
# Copyright (C) 2004 Sam Hocevar 14 rue de Plaisance, 75014 Paris, France | |
# Everyone is permitted to copy and distribute verbatim or modified | |
# copies of this license document, and changing it is allowed as long | |
# as the name is changed. | |
# |
We have a failing disk.
There is data on the disk that we would like to recover, if at all possible.
We can still access the disk using ddrescue
, but it is really slow, when we just
try to dump the disk, estimated runtime is more than a year.
We are not actually interested in all the blocks of the disk: There are only specific
from django.conf import settings | |
from django.db.models.fields import NOT_PROVIDED | |
from wagtail.admin.edit_handlers import FieldPanel, MultiFieldPanel | |
class TranslatedFieldPanel(MultiFieldPanel): | |
""" | |
Allow editing of translated fields. |
#!/usr/bin/env python3 | |
import json | |
import sys | |
try: | |
file_path = sys.argv[1] | |
except IndexError: | |
sys.stderr.write(f"Usage: {sys.argv[0]} <file_path>\n") | |
sys.exit(1) |
--- | |
- name: Reload networking (in-band) | |
service: | |
name: networking | |
state: reloaded | |
- name: Reload networking (out-of-band) | |
shell: ifreload --allow=mgmt | |
async: 45 |