Feb 22nd, 2022
- Operating system: Ubuntu 20.04 x84_64 (64-bit)
- Architecture: amd64
- GPU: NVIDIA GeForce RTX 3090
- Python 3.8
ACTION=="add", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1038" RUN+="/etc/udev/rules.d/steelseries-perms.py '%E{DEVNAME}'" |
#! /bin/sh | |
# the metadata only contains the name of the default sink | |
default_sink_name=$(pw-metadata 0 'default.audio.sink' | grep 'value' | sed "s/.* value:'//;s/' type:.*$//;" | jq .name) | |
default_sink_id=$(pw-dump Node Device | jq '.[].info.props|select(."node.name" == '" $default_sink_name "') | ."object.id"') | |
current_volume=$(pw-cli enum-params "$default_sink_id" 'Props' | grep -A 2 'Spa:Pod:Object:Param:Props:channelVolumes' | awk '/Float / {gsub(/.*Float\s/," "); print $1^(1/3) }') | |
change="${1:-0.1}" # defaults to increment of 0.1 | |
new_volume=$(echo "$current_volume $change" | awk '{printf "%f", $1 + $2}') | |
# we need to reconvert to cubic root | |
#new_volume_cube=$(echo "$new_volume" | awk '{ print $1^3 }') |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# This is how I used it: | |
# $ cat ~/.bash_history | python bash-to-zsh-hist.py >> ~/.zsh_history | |
import sys | |
import time |
# source: https://forum.proxmox.com/threads/removing-deleting-a-created-cluster.18887/ | |
#/bin/sh | |
# stop service | |
systemctl stop pvestatd.service | |
systemctl stop pvedaemon.service | |
systemctl stop pve-cluster.service | |
systemctl stop corosync | |
systemctl stop pve-cluster | |
killall pmxcfs |
# https://github.com/oobabooga/text-generation-webui/blob/main/README.md | |
# https://github.com/oobabooga/text-generation-webui/blob/main/docs/Spell-book.md | |
# by default the Dockerfile specifies these versions: 3.5;5.0;6.0;6.1;7.0;7.5;8.0;8.6+PTX | |
# https://developer.nvidia.com/cuda-gpus you can find the version for your card here | |
# Tesla P100 = sm_60, sm_61, sm_62 and compute_60, compute_61, compute_62 | |
# TORCH_CUDA_ARCH_LIST=6.0,6.1,6.2,7.0,7.5,8.0,8.6+PTX | |
# RTX3090 = sm_86 and compute_86 (PTX) | |
#8.6+PTX | |
# Tesla P100 = sm_60, sm_61, sm_62 and compute_60, compute_61, compute_62 |
# | |
# Copyright (C) 2013-2020 Vinay Sajip. New BSD License. | |
# | |
import os | |
import os.path | |
from subprocess import Popen, PIPE | |
import sys | |
from threading import Thread | |
from urllib.parse import urlparse | |
from urllib.request import urlretrieve |
esphome: | |
name: watermeter-magnet | |
friendly_name: watermeter | |
esp8266: | |
board: nodemcuv2 | |
logger: | |
level: INFO |
apt update && apt dist-upgrade -y
apt install -y git curl gpg build-essential devscripts pkg-config cmake
wget https://raw.githubusercontent.com/ZoneMinder/zoneminder/master/utils/do_debian_package.sh
chmod +x do_debian_package.sh
mv do_debian_package.sh /usr/local/bin/zm-builder
mkdir ~/zm-build
cd ~/zm-build