import time, contextlib, struct, json
import uwsgi
def token_bucket(interval, burst=1):
token_fmt = '>dL'
token_len = struct.calcsize(token_fmt)
token_get = lambda: struct.unpack(token_fmt, uwsgi.sharedarea_read(0, token_len))
token_set = lambda *v: uwsgi.sharedarea_write(0, struct.pack(token_fmt, *v))
token_set(time.monotonic(), burst)
View luadec-workplace.lua
UIWorkshiftUpdate = function(self, building, shift)
-- function num : 0_56 , upvalues : shift_names, _ENV, WorkerSlot, OpenSlot, ClosedSlot
local training = not building:IsKindOf("TrainingBuilding") or building.max_visitors > 0
local workplace = not building:IsKindOf("Workplace") or building.max_workers > 0
local shift_active = building:IsShiftUIActive(shift)
local shift_closed = building:IsClosedShift(shift)
if workplace then
local shift_overtime = (building.overtime)[shift]
View benchmark-notes.rst

Benchmark is on FAT32 partition.

Any logs it will produce, along with collected test results will be put into "wb" (abbrev for "wifi benchmark") dir next to it.

It can be started from console using mesh-test -b command.
(or you can run it directly via /boot/fat/ - same thing)

Supposed to be started and run after all antennas are setup and boards can be just left alone for a while, as it runs tests with different parameters in

### Option-A: if this stuff can be allowed to run for 18 hours (!!!)
# 30min between tests on multiple channels, with some redundancy
030-base-00 060-base-10 090-base-20
120-base-00 150-base-10r 180-base-20r
210-base-00n 240-base-10n 270-base-20n
View mesh-test.txt
% ./mesh-test -h
usage: mesh-test [-h] [-r offset] [-n 1-or-0] [-t txpower] [-b]
Tool to run various testing tweaks and commands.
optional arguments:
-h, --help show this help message and exit
phydm tweaks (via mesh-phydm tool):
These can be applied at any time without AP/STA reconnect or driver reload.
View lsusb1.txt
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc2/1p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
View gist:ec4b7139f61173f455775559d6e94455
# root@odc1:~# tc -d -s qdisc #!266 13:03
qdisc noqueue 0: dev lo root refcnt 2
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc mq 0: dev eth0 root
Sent 38207566 bytes 181244 pkt (dropped 0, overlimits 0 requeues 5)
backlog 0b 0p requeues 5
qdisc fq_codel 0: dev eth0 parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
Sent 38207566 bytes 181244 pkt (dropped 0, overlimits 0 requeues 5)
backlog 0b 0p requeues 5
View gist:0fbc246db347e09563ffee947ff5ea53
add_dracutmodules+="dash btrfs crypt dm lvm terminfo rootfs-block udev-rules kernel-modules base"
omit_dracutmodules+="systemd bootchart network plymouth dmraid multipath cifs fcoe fcoe-uefi iscsi nbd nfs ssh-client biosdevname mdraid resume i18n"
View gist:01225cf39fd3f83329cff2ad6c634366
-----------I--e---- ./usr/include
-----------I--e---- ./usr/lib
-----------I--e---- ./usr/bin
-----------I--e---- ./usr/include/linux
-----------I--e---- ./usr/share/kbd/consolefonts
-----------I--e---- ./usr/share/i18n/locales
-----------I--e---- ./usr/share/i18n/charmaps
-----------I--e---- ./usr/share/perl5/core_perl/pod
-----------I--e---- ./usr/share/terminfo/d
-----------I--e---- ./usr/share/terminfo/t
View gist:4d8f4f703ffa479fabdf125aa76254bc
.f........x usr/bin/ping
.f........x usr/bin/rcp
.f........x usr/bin/rlogin
.f........x usr/bin/rsh
.d.......a. var/log/journal/
.d.......a. var/log/journal/remote/