Skip to content

Instantly share code, notes, and snippets.

View baudneo's full-sized avatar
👽
Mars 2034

baudneo baudneo

👽
Mars 2034
  • dAIngerous Consulting
  • Canada
View GitHub Profile
@baudneo
baudneo / gist:a2b164954d37969e5aa5c052a5c83161
Created October 20, 2021 11:29
Log output from forked ZMES - this is the zmevenotnotification side, animation creation, Pushover, Home Assistant and MQTT add-ons enabled and working correctly.
# This is not the same event as the mlapi logs, this is a past event with animations turned on, MQTT and HomeAssistant add-ons integrated and the new pushover add-on enabled.
❯ es.baredebug.objdet 38619
==> /var/log/zm/zmesdetect_m4.log <==
10/20/21 05:21:18.907295 zmesdetect_m4[742399] INF ZMLog:285 [Setting up signal handlers for log rotation and log in
terrupt]
10/20/21 05:21:19.244361 zmesdetect_m4[742399] INF ZMLog:292 [Connected to ZoneMinder Logging system with user 'www-
data' -> /var/log/zm/zmesdetect_m4.log]
10/20/21 05:21:19.270691 zmesdetect_m4[742399] DBG1 pyzm_utils:1030 ['std.out' -> TESTING STDOUT FOR ZM_DETECT]
10/20/21 05:21:19.272079 zmesdetect_m4[742399] DBG1 pyzm_utils:1032 [10/20/21 05:21:18.206647 CNSL[DBG1] pyzm_utils:
# Most recent base64 attempt
# SERVER SIDE
class Detect(Resource):
@jwt_required
def post(self):
# all the logic needed to build the request to grab images from an API at a certain URL
# requesting images from specified URL
response = request.post(xxxxx)
# Other attempt
response = requests.post(to the api that serves images)
r = response
img = np.asarray(bytearray(response.content), dtype="uint8")
image = cv2.imdecode(img, cv2.IMREAD_COLOR) # RGB ?
object['thing'] = image
# Now to send it in the response
img = object['thing'].tobytes()
response = make_response(img)
@baudneo
baudneo / read_nonblocking.py
Created November 16, 2021 05:53 — forked from conrad784/read_nonblocking.py
nonblocking read function for python, e.g. for named pipes
def read_nonblocking(path, bufferSize=100, timeout=.100):
import time
"""
implementation of a non-blocking read
works with a named pipe or file
errno 11 occurs if pipe is still written too, wait until some data
is available
"""
grace = True
@baudneo
baudneo / nvidia-fix-linux-5.13.patch
Created November 21, 2021 07:42 — forked from joanbm/nvidia-fix-linux-5.13.patch
Tentative fix for NVIDIA 465.27 driver for Linux 5.13-rc1
From 6c1d401600b76dd7d9c24ca4c6aa8d6e6b54fb05 Mon Sep 17 00:00:00 2001
From: Joan Bruguera <joanbrugueram@gmail.com>
Date: Fri, 16 Apr 2021 09:29:24 +0200
Subject: [PATCH] Tentative fix for NVIDIA 465.27 driver for Linux 5.13-rc1
---
nvidia-drm/nvidia-drm-crtc.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/nvidia-drm/nvidia-drm-crtc.c b/nvidia-drm/nvidia-drm-crtc.c
@baudneo
baudneo / gist:981f54244d33bfdf2eacb91f10f6fecd
Created November 30, 2021 22:30
EventCommandStart - delayed?
zmc_m1 INF - DEBUG logs did not seem to have any extra pertinent data ->
11/30/21 15:22:26.818604 zmc_m1[641].INF-zm_monitor.cpp/2111 [Front: 3486 - Gone into prealarm state]
11/30/21 15:22:27.016381 zmc_m1[641].INF-zm_monitor.cpp/2048 [Front: 3490 - Gone into alarm state PreAlarmCount: 2 > AlarmFrameCount:3 Cause:Forced Web]
11/30/21 15:22:28.019765 zmc_m1[521].INF-zm_monitor.cpp/1692 [Front: 3500 - Capturing at 10.00 fps, capturing bandwidth 779159bytes/sec Analysing at 0.00 fps]
11/30/21 15:22:33.242260 zmc_m1[641].INF-zm_monitor.cpp/2102 [Front: 3488 - Opening new event 51561, alarm start]
11/30/21 15:22:38.017708 zmc_m1[521].INF-zm_monitor.cpp/1692 [Front: 3600 - Capturing at 10.00 fps, capturing bandwidth 776973bytes/sec Analysing at 0.00 fps]
zmdetect_m1 DBG ->
@baudneo
baudneo / .xbindkeysrc
Created June 29, 2022 06:00 — forked from thraizz/.xbindkeysrc
XF86 media key bindings using xbindkeys
"pactl set-sink-volume @DEFAULT_SINK@ -1000"
XF86AudioLowerVolume
"pactl set-sink-volume @DEFAULT_SINK@ +1000"
XF86AudioRaiseVolume
"playerctl play-pause"
m:0x0 + c:208
XF86AudioPlay
"playerctl play-pause"
m:0x0 + c:209
XF86AudioPause
@baudneo
baudneo / Proxmox email relay.md
Last active April 19, 2024 14:03 — forked from tomdaley92/README.md
Proxmox - Email Alerts Setup (gmail)

Proxmox - Email Alerts Setup (gmail)

  1. SSH into proxmox node and become root user. Run the following commands to download extra software dependencies we'll need.

    apt update
    apt install -y libsasl2-modules mailutils
  2. Enable 2FA for the gmail account that will be used by going to security settings

@baudneo
baudneo / mac-vendors.json
Created April 23, 2023 19:12 — forked from hemantapkh/mac-vendors.json
List of MAC address OUI with their Vendors in JSON format.
# https://gist.github.com/aallan/b4bb86db86079509e6159810ae9bd3e4
{
"OFFICIALLY XEROX": [
"000000"
],
"SUPERLAN-2U": [
"000001"
],
"BBN (WAS INTERNAL USAGE ONLY, NO LONGER USED)": [
@baudneo
baudneo / zmNinja_error.log
Last active April 30, 2023 16:24
CloudFlare browser secuirty check error for apps hosted via CF (cloudflared) tunnels - Started mid April 2023
Apr 30, 2023 09:45:48:605 AM DEBUG *** Inside native HTTP error for
url:{
"status":403,
"url":"https://zm.<<<REDACTED>>>.com/zm/api/host/login.json?token=<<<REDACTED>>>L3zzdPc0jKc_AkhrsQlJG87IsSHUk_qm7Rwc6XXe-nI",
"headers":{
"date":"Sun, 30 Apr 2023 15:45:48 GMT",
"server":"cloudflare",
"expires":"Thu, 01 Jan 1970 00:00:01 GMT",
"cf-ray":"7c00e9f65bae842b-YVR",