Via Iwrin-Hall/uniform sum distribution.
μ = n / 2, σ = sqrt(n / 12)
where n = # of summed uniform U(0, 1) random variables
Scale and shift Irwin-Hall to provide μ and σ as needed.
| # | |
| # Reverse proxy config for Ruckus Unleashed controllers | |
| # | |
| # Requirements: | |
| # | |
| # - DNS entries for all unleashed<IPv4 last octet of controllers>.example.com | |
| # - DNS entry for unleashed.example.com | |
| # - (DNS entries to point to Nginx reverse proxy) | |
| # - Wildcard TLS cert on reverse proxy (or SAN cert covering all above mentioned names) | |
| # |
| #!/bin/bash | |
| cat <<EOF > req.template | |
| [req] | |
| #default_bits = 2048 | |
| distinguished_name = dn | |
| prompt = no | |
| #req_extensions = req_ext | |
| [dn] |
| #!/bin/sh | |
| # https://tqdev.com/2022-luks-with-usb-unlock | |
| # | |
| # Script to unlock Ubuntu LUKS encrypted volume from initramfs during boot using | |
| # a keyfile stored on a USB thumb drive with fallback to manual passphrase entry. | |
| # | |
| # Runs in Busybox shell environment in initramfs | |
| # After updates to this script or crypttab, update initramfs: | |
| # |
| ''' | |
| Script for converting GetPocket.com exported HTML to CSV | |
| Export data via https://getpocket.com/export | |
| ''' | |
| import csv | |
| import sys | |
| import xml.etree.ElementTree as ET | |
| def main(): |
Via Iwrin-Hall/uniform sum distribution.
μ = n / 2, σ = sqrt(n / 12)
where n = # of summed uniform U(0, 1) random variables
Scale and shift Irwin-Hall to provide μ and σ as needed.
| type: picture-elements | |
| title: Hik PTZ Control | |
| elements: | |
| - type: icon | |
| icon: mdi:arrow-up | |
| tap_action: | |
| action: call-service | |
| service: rest_command.hik_ptz_up | |
| hold_action: | |
| action: call-service |
| network: | |
| version: 2 | |
| renderer: networkd | |
| ethernets: | |
| mvlan-bridge: | |
| addresses: | |
| - 192.168.0.10/32 | |
| routes: | |
| - to: 192.168.0.128/28 # docker macvlan address range | |
| via: 192.168.0.10 |
| # | |
| # # REST Switch configs for toggling the white "Supplemental Lights" on Hikvision/Annke cameras | |
| # | |
| # Note that we must hit the cameras' ISAPI endpoints directly, not through the NVR, | |
| # since (at least the Annke N88PCH) NVR does not seem to support getting nor setting the | |
| # `/ISAPI/Image/channels/<ID>/supplmentalLight` API endpoint. This also implies that | |
| # we must use the NVR's "integration password," i.e. the username and password used by the | |
| # NVR to automatically config the cameras, NOT a user of the NVR itself. | |
| # | |
| # ## Camera Settings |
| ''' | |
| # Parse ffprobe keyframe output | |
| Run with | |
| ffprobe -loglevel error -show_entries packet=pts_time,flags -of csv=print_section=0 -i <input file or stream> | python kf.py | |
| See https://stackoverflow.com/a/18088156 | |
| ''' |
| ''' | |
| TUF-2000m | |
| Module to test TUF-2000m ultrasonic flow meter | |
| via a Modbus RTU to Modbus TCP bridge (eByte NA111-A) | |
| ''' | |
| import csv | |
| import sys | |
| import os |