Handy Linux command

“REISUB” (The Safe Reboot)

If your entire computer is frozen and the kills above don’t help, Linux users often use the REISUB sequence to reboot safely without corrupting the hard drive. You hold Alt + SysRq and slowly type:

R (unRaw keyboard)
E (tErminate processes)
I (kIll processes)
S (Sync data to disk)
U (Unmount disks)
B (reBoot)

Memory  Tool
sudo apt install htop

Hard Disk Tool:
sudo apt install baobab

MQTT SERVER:

sudo systemctl stop mosquitto
sudo rm /var/lib/mosquitto/mosquitto.db
sudo systemctl start mosquitto
systemctl status mosquitto //IS it running
tail -f /path/to/logfile // Outputs the last 10 lines of a file and actively monitors it for new entries.

PID

PS AUX //Show all process

KILL
Kill PID number
killall python3
killall chrome

Gemini –yolo //accepts all edits without prompting

Networking:
ss -tulpn // Shows all listening ports and the processes attached to them.

🛠️ The “Oops” Savers
history | grep <keyword>: Searches your terminal history for that complex, 50-character command you typed three days ago but forgot to save.

sudo !!: If you type a command and get a “Permission denied” error, running this will instantly rerun your last command with sudo appended to the front.

 

————————–
Python CACHE DELETE:
# Deletes all __pycache__ directories
find . -type d -name “__pycache__” -exec rm -rf {} +

# Deletes any stray compiled Python files (especially helpful for older Python versions)
find . -type f -name “*.py[co]” -delete

# pip cahse purge
pip cache purge

Rust Headless 96kHz Audio Console

Architecting a Scalable, Headless Audio Console in Rust

In the world of professional audio—spanning broadcast, cinema, and large-scale live events—the mixing console is the heart of the operation. Traditionally, these have been massive hardware monoliths. Today, however, the industry is shifting toward headless, scalable audio engines that run on standard server hardware, controlled remotely by software endpoints.

This article proposes the architecture for Titan-96k, a scalable, 32-bit floating-point audio mixing engine written in Rust. It is designed to handle everything from a simple podcast setup to complex 7.1.4 immersive audio workflows, controlled entirely via MQTT.

Continue reading

Python: SNMP put into a Google Sheet:

from pysnmp.hlapi import *
import gspread
from oauth2client.service_account import ServiceAccountCredentials

# SNMP query function
def snmp_query(ip, community, oid):
errorIndication, errorStatus, errorIndex, varBinds = next(
getCmd(SnmpEngine(),
CommunityData(community),
UdpTransportTarget((ip, 161)),
ContextData(),
ObjectType(ObjectIdentity(oid)))
)

if errorIndication:
print(errorIndication)
elif errorStatus:
print(‘%s at %s’ % (errorStatus.prettyPrint(),
errorIndex and varBinds[int(errorIndex) – 1][0] or ‘?’))
else:
for varBind in varBinds:
return varBind[1].prettyPrint() Continue reading

Python OSC device – Motarized fader for volume + mute switch and solo switch

import reapy
import OSC

# Create an OSC client to send messages to Reaper
client = OSC.OSCClient()
client.connect(("127.0.0.1", 8000))

# Create an OSC server to receive messages from the fader and switches
server = OSC.OSCServer(("127.0.0.1", 9000))

def handle_volume(path, tags, args, source):
volume = args[0]
# Set the volume of the track using the Reaper API
reapy.connect()
track = reapy.Track(1)
track.volume = volume
reapy.disconnect()

# Add a callback for the volume fader
server.addMsgHandler("/volume", handle_volume)

def handle_mute(path, tags, args, source):
mute = args[0]
# Set the mute of the track using the Reaper API
reapy.connect()
track = reapy.Track(1)
track.mute = mute
reapy.disconnect()

# Add a callback for the mute switch
server.addMsgHandler("/mute", handle_mute)

def handle_solo(path, tags, args, source):
solo = args[0]
# Set the solo of the track using the Reaper API
reapy.connect()
track = reapy.Track(1)
track.solo = solo
reapy.disconnect()

# Add a callback for the solo switch
server.addMsgHandler("/solo", handle_solo)

# Run the OSC server
st = threading.Thread(target=server.serve_forever)
st.start()