Skip to content

Instantly share code, notes, and snippets.

View mweinelt's full-sized avatar

Martin Weinelt mweinelt

View GitHub Profile
django-crispy-bootstrap3> ____________________ test_form_show_errors_non_field_errors ____________________
django-crispy-bootstrap3>
django-crispy-bootstrap3> @pytest.mark.skipif(
django-crispy-bootstrap3> __version__[0] == "1", reason='#1262 fixed required attributes and empty for="".'
django-crispy-bootstrap3> )
django-crispy-bootstrap3> @override_settings(CRISPY_CLASS_CONVERTERS=CONVERTERS)
django-crispy-bootstrap3> def test_form_show_errors_non_field_errors():
django-crispy-bootstrap3> form = SampleForm({"password1": "wargame", "password2": "god"})
django-crispy-bootstrap3> form.helper = FormHelper()
django-crispy-bootstrap3> form.helper.form_show_errors = True
diff --git a/custom_components/calendar_export/api.py b/custom_components/calendar_export/api.py
index e42a23c..21a941d 100644
--- a/custom_components/calendar_export/api.py
+++ b/custom_components/calendar_export/api.py
@@ -1,6 +1,7 @@
"""API for calendar export."""
from datetime import datetime, timedelta
+from hashlib import sha256
from http import HTTPStatus
@mweinelt
mweinelt / gist:0ea6b98b7ea0af9b38c73b88a102051d
Created March 7, 2025 11:22
Count commits/committers between nixos releases
# commit count measured from branch-off of the previous release to the final release of the new release
function count_commits() {
OLD="$1"
NEW="$2"
git log "${OLD}-beta..${NEW}" --no-merges --format=%an | wc -l
}
count_commits 19.09 20.03
count_commits 20.03 20.09
copying path '/nix/store/4zi1rifwl450yfwm9kigpd7y2w1hdr37-source' from 'https://cache.nixos.org'...
copying path '/nix/store/kannwnws02w1dvzafvfpagajaqb7haqq-python3.12-pytest-asyncio-0.25.2' from 'https://cache.nixos.org'...
copying path '/nix/store/w7vzs90i31gd4kg5vm2lx27yx8r24bjg-python3.12-poetry-core-2.0.1' from 'https://cache.nixos.org'...
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pypa-build-hook
Using pypaBuildPhase
Sourcing python-runtime-deps-check-hook
Using pythonRuntimeDepsCheckHook
machine # [ 202.883606] container foo[4646]: Halting system.
machine # [ 202.899773] systemd-nspawn[4646]: Container foo has been shut down.
machine # [ 202.904399] dbus-daemon[659]: [system] Activating via systemd: service name='org.freedesktop.machine1' unit='dbus-org.freedesktop.machine1.service' requested by ':1.14' (uid=0 pid=4646 comm="/nix/store/fampg5z6zz78pxxvbg7zclhfblivw2xa-system" label="kernel")
machine # [ 202.934617] systemd[1]: Starting Virtual Machine and Container Registration Service...
machine # [ 203.050885] dbus-daemon[659]: [system] Successfully activated service 'org.freedesktop.machine1'
machine # [ 203.058235] systemd[1]: Started Virtual Machine and Container Registration Service.
machine # [ 203.069154] systemd-machined[5117]: Assertion 'pidref_is_set(&m->leader)' failed at src/machine/machine.c:496, function machine_watch_pidfd(). Aborting.
machine # [ 203.126675] systemd-coredump[5118]: Process 5117 (systemd-machine) of user 0 terminated abnormally with signal 6/ABRT, proc
@mweinelt
mweinelt / gist:f099ec270ace7cb197954e23871471be
Created November 29, 2024 19:21
systemctl reload nginx on nixos-24.11 (ee202b2125eb6cfd953509fc7bb336a7658de960)
# strace -s 256 -f systemctl reload nginx
execve("/run/current-system/sw/bin/systemctl", ["systemctl", "reload", "nginx"], 0x7ffcab4a8c78 /* 106 vars */) = 0
brk(NULL) = 0x559ed3ce0000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8d4cc84000
access("/etc/ld-nix.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/ivqjhj99firnjq7gp14qf35821viwi5m-systemd-256.7/lib/systemd/glibc-hwcaps/x86-64-v4/libsystemd-shared-256.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/nix/store/ivqjhj99firnjq7gp14qf35821viwi5m-systemd-256.7/lib/systemd/glibc-hwcaps/x86-64-v4/", 0x7ffce6b3cde0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/ivqjhj99firnjq7gp14qf35821viwi5m-systemd-256.7/lib/systemd/glibc-hwcaps/x86-64-v3/libsystemd-shared-256.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/nix/store/ivqjhj99firnjq7gp14qf35821viwi5m-
Machine state will be reset. To keep it, pass --keep-vm-state
start all VLans
start vlan
running vlan (pid 7; ctl /build/vde1.ctl)
(finished: start all VLans, in 0.00 seconds)
Test will time out and terminate in 3600 seconds
run the VM test script
additionally exposed symbols:
acme, client, dnsserver, webserver,
vlan1,
@mweinelt
mweinelt / gist:c0f3883a57647229009e36a7dd3e1f4f
Created November 26, 2024 22:27
firefox-unwrapped 133.0 aarch64-darwin build failure
This file has been truncated, but you can view the full file.
https://cache.nixos.org/3caakgg9y73j8dfnx264pyzx4q3mvp48.narinfo
https://cache.nixos.org/881fz3q9l4id7qdaya0vf3m7x8qx3n07.narinfo
https://cache.nixos.org/6wsdh6246xbmlv3jr5q7qpl9ay3acq04.narinfo
https://cache.nixos.org/56vyf2b4vl2hyj47qp1nnjmpkr36vmbv.narinfo
https://cache.nixos.org/8nvdpwszwqxhf687ns3dpw9lskz64r9z.narinfo
https://cache.nixos.org/99pgwx85p65wffxr0p1gcd8ijzg1jvvm.narinfo
https://cache.nixos.org/ary0gw3cnhvampczxqzm931h1gp8cswh.narinfo
https://cache.nixos.org/b027smacjqw867fbpgfkm3rarq0v8z5h.narinfo
https://cache.nixos.org/b5hizq4lvly3mv6nrdc95a7hggy1gis2.narinfo
https://cache.nixos.org/c2i2n7np19vjk79jnsbnlk8ypiq31mjs.narinfo
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pypa-build-hook
Using pypaBuildPhase
Sourcing python-runtime-deps-check-hook
Using pythonRuntimeDepsCheckHook
Sourcing pypa-install-hook
Using pypaInstallPhase
Sourcing python-imports-check-hook.sh
denonavr> ============================= test session starts ==============================
denonavr> platform linux -- Python 3.12.7, pytest-8.3.3, pluggy-1.5.0
denonavr> rootdir: /build/source
denonavr> configfile: pyproject.toml
denonavr> plugins: asyncio-0.23.8, httpx-0.32.0, anyio-4.6.0, timeout-2.3.1
denonavr> asyncio: mode=Mode.STRICT
denonavr> collected 30 items
denonavr>
denonavr> tests/test_denonavr.py FEFEFEFE.................FEFEFEFEFEFEFEFE [ 96%]
denonavr> tests/test_ssdp.py . [100%]