Skip to content

Instantly share code, notes, and snippets.

import paho.mqtt.client as mqtt
from time import sleep
import json
import random
DEVICES_TOPIC = 'zigbee2mqtt/bridge/devices'
lamps = []
action = ""
kvm03 ~ # ovn-nbctl --no-leader show srvlab-mgt
switch e967808f-71b3-4681-a1c8-dc6661f56a41 (srvlab-mgt)
port 3402dfd3-8512-4b94-9ab8-28d920acbf88
addresses: ["52:54:00:44:d0:de dynamic"]
port b4b92f7a-26cb-44b5-9ba9-05527f2518bb
addresses: ["52:54:00:28:8b:ca dynamic"]
kvm03 ~ # ovn-nbctl --no-leader show srvlab-headscale
switch 8173cf96-f515-49ef-865a-385fcba4ab3b (srvlab-headscale)
port b90ab7d4-c919-4831-973f-473b5ee1e5e4
_execute_multiple_choice() {
local cmd
local prefix
local choices
if [[ "$#" -eq "2" ]]; then
cmd="$1"
prefix=""
choices="$2"
elif [[ "$#" -eq "3" ]]; then
12:03:33.758 [inf] roc_pipeline: receiver: removing session
12:03:33.931 [inf] roc_pipeline: receiver: creating session: src_addr=10.1.0.111:34407 dst_addr=0.0.0.0:12001
12:03:33.931 [dbg] roc_packet: delayed reader: initializing: delay=2205
12:03:33.931 [dbg] roc_fec: of decoder: initializing: codec=rs m=8
12:03:33.931 [dbg] roc_audio: depacketizer: initializing: n_channels=2
12:03:33.931 [dbg] roc_audio: watchdog: initializing: max_blank_duration=96000 max_drops_duration=96000 drop_detection_window=14400
12:03:33.935 [dbg] roc_audio: resampler: initializing: window_interp=128 window_size=32 frame_size=640 channels_num=2
12:03:33.935 [dbg] roc_audio: latency monitor: initializing: target_latency=2205 in_rate=44100 out_rate=48000
12:03:33.935 [dbg] roc_packet: router: detected new stream: source=1983058060 flags=0x8u
12:03:33.935 [dbg] roc_audio: depacketizer: ts=320 loss_ratio=0.00000
I 0286:02:30:56.67 00077 ports: port 22 in Trk2 is now off-line
I 0286:02:31:00.88 00435 ports: port 22 is Blocked by LACP
I 0286:02:31:01.56 00435 ports: port 22 is Blocked by STP
I 0286:02:31:01.56 00076 ports: port 22 in Trk2 is now on-line
I 0287:13:18:47.64 00077 ports: port 22 in Trk2 is now off-line
I 0288:00:41:57.28 00435 ports: port 22 is Blocked by LACP
I 0288:00:41:57.30 00435 ports: port 22 is Blocked by STP
I 0288:00:41:57.30 00076 ports: port 22 in Trk2 is now on-line
#!/usr/bin/env bash
source venv/bin/activate
echo "Starting to save ROC"
gst-launch-1.0 alsasrc ! audio/x-raw,channels=2,rate=48000 ! audioconvert ! audioconvert ! queue min-threshold-bytes=96000 max-size-bytes=192000 ! opusenc bitrate=128000 inband-fec=true frame-size=20 ! oggmux max-delay=100 ! filesink location=roc.opus >/dev/null &
gstpid="$!"
sleep 30
apiVersion: v1
kind: Namespace
metadata:
name: helloworld
spec: {}
#[derive(Debug)]
struct Node {
id: u32,
}
#[derive(Debug)]
struct Edge {
left: u32,
right: u32,
}
#!/bin/bash
set -euo pipefail
if podman pod inspect gitlab 1>/dev/null 2>&1; then
echo "Deleting old pod"
podman pod rm --force gitlab
fi
echo "Creating new pod"
import requests
from bs4 import BeautifulSoup
from typing import Iterable
import time
import re
BASE = 'https://bbs.io-tech.fi'
PATH = '/forums/naeytoenohjaimet.74/?prefix_id=1'
index = requests.get(BASE + PATH)