Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
RAW_STATUS=$(python3 ~/src/starlink-grpc-tools/dish_grpc_text.py -s 2 status)
STARLINK_CONNECTED=$(echo "$RAW_STATUS" | cut -f 5 -d',')
if [[ "${STARLINK_CONNECTED}" == "CONNECTED" ]]; then
STARLINK_CONNECTED='${color green}'"CONNECTED"'${color}'
elif [[ "${STARLINK_CONNECTED}" == "OFFLINE" ]]; then
STARLINK_CONNECTED='${color red}'"OFFLINE"'${color}'
else
STARLINK_CONNECTED='${color yellow}'"${STARLINK_CONNECTED}"'${color}'

Objective

The goal is being able to mix your microphone and desktop audio into a single track, while leaving Discord out of the equation. This allows you to stream your desktop audio and talk while in a call, without your partners hearing themselves.

Voicemeeter Setup

Download Voicemeeter

Voicemeeter Banana

@jstanley23
jstanley23 / __init__.py
Created June 26, 2019 18:17
Modified __init__
import os
from ZenPacks.zenoss.ZenPackLib import zenpacklib
from Products.ZenModel.ZenPack import ZenPack as ZenPackBase
from Products.ZenUtils.Utils import unused, zenPath
CFG = zenpacklib.load_yaml([os.path.join(os.path.dirname(__file__), "zenpack.yaml")], verbose=False, level=30)
schema = CFG.zenpack_module.schema
class ZenPack(schema.ZenPackBase):
{
"start": 1540209836063,
"end": 1540213436063,
"series": true,
"downsample": "10s-max",
"tags": {},
"returnset": "EXACT",
"metrics": [
{
"metric": "DEVICE_ID/DATASOURCE_DATAPOINT",
/bin/bash -c 'iface_name="access"; host="192.168.23.202"; snmp_cmd="snmpwalk -v 2c -c public -On $${host}"; sipifaceoid="1.3.6.1.4.1.9148.3.15.1.2.1.1"; sipratetableoid="1.3.6.1.4.1.9148.3.15.1.2.2.1"; output="OK|%s\n"; iface_index=$$($${snmp_cmd} $${sipifaceoid} | grep -oE "[0-9]+\s.*\"$${iface_name}\"$$" | awk -F" " "{print $$1}"); table_data="$$($${snmp_cmd} $${sipratetableoid})"; datasources=""; regex="([0-9]+)\.([0-9]+)\.([0-9]+) =.*([0-9]+)$$"; while read -r table_row; do if [[ $$table_row =~ $$regex ]]; then traffic_type_id=$${BASH_REMATCH[1]}; iface=$${BASH_REMATCH[2]}; sip_method_id=$${BASH_REMATCH[3]}; value=$${BASH_REMATCH[4]}; if [[ $${iface} -eq $${iface_index} ]]; then case $${sip_method_id} in 1) sip_method="other";; 2) sip_method="invite";; 3) sip_method="ack";; 4) sip_method="bye";; 5) sip_method="register";; 6) sip_method="cancel";; 7) sip_method="prack";; 8) sip_method="options";; 9) sip_method="info";; 10) sip_method="subscribe";; 11) sip_method="notify";; 12) sip_method="refer";
@jstanley23
jstanley23 / webTX_example
Created April 26, 2019 19:06
webTx example
url https://${dev/id}/zport/acl_users/cookieAuthHelper/login_form
fv loginform __ac_name MYUSER
fv loginform __ac_password MYPASS
submit
# Make sure we aren''t back at the login page with a bad user/pass
notfind 'username is incorrect'
url '${dev/id}/zport/dmd/'
@jstanley23
jstanley23 / exportControlCenterConfigs.sh
Created April 17, 2019 14:37
Export all Control Center configs to files
IFS=$'\n'; for x in $(serviced service list --show-fields=Name,ServiceID | grep -v 'ServiceID'); do IFS=" "; s=($x); serviced service list ${s[1]} > /tmp/${s[0]}.json; done
@jstanley23
jstanley23 / createZenossComponent.py
Created April 16, 2019 18:59
create a mock component on a Zenoss device
from ZenPacks.training.NetBotz.NetBotzTemperatureSensor import NetBotzTemperatureSensor
sensor = NetBotzTemperatureSensor('test_sensor_01')
device = find("Netbotz01")
device.netBotzTemperatureSensors._setObject(sensor.id, sensor)
sensor = device.netBotzTemperatureSensors._getOb(sensor.id)
print sensor
print sensor.device()
@jstanley23
jstanley23 / ValueChangeThreshold.yaml
Created April 3, 2019 12:16
Example Zenoss ValueChangeThreshold
name: ZenPacks.jstanley.NetworkMonitoring
device_classes:
/Network/Cisco/NewDeviceClass:
templates:
EthernetInterface:
targetPythonClass: ZenPacks.zenoss.CiscoMonitor.EthernetInterface
thresholds:
statusChange:
enabled: true
type: ValueChangeThreshold
--- WinService.py 2018-06-05 19:56:57.000000000 +0000
+++ WinService.new 2018-07-18 20:45:07.476079168 +0000
@@ -99,8 +99,20 @@
return True
elif status is EXCLUDED:
return False
- # 3 - Check all other DataSources
+ # 3 - Check for DataSources that match the service name
ds_monitored = False
+ datasource = template.datasources._getOb(self.serviceName, None)