Skip to content

Instantly share code, notes, and snippets.

View onyx-and-iris's full-sized avatar
💭
Reading: Publishing Python Packages by Dane Hillard

Onyx and Iris onyx-and-iris

💭
Reading: Publishing Python Packages by Dane Hillard
View GitHub Profile
@onyx-and-iris
onyx-and-iris / test-midiappfader.py
Last active June 17, 2025 17:44
Control Voicemeeter App Volume with Midi Slider
import logging
import voicemeeterlib
logging.basicConfig(level=logging.DEBUG)
class MidiObserver:
"""A simple observer to handle MIDI events."""
@onyx-and-iris
onyx-and-iris / stop-record-delete-recording-start-new.py
Last active June 8, 2025 14:21
obspython - Stop record, delete file and then start recording again
# Copyright (C) 2025 Onyx and Iris
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@onyx-and-iris
onyx-and-iris / stop-record-delete-recording-start-new-websocket.py
Last active June 8, 2025 14:21
OBS - Stop record, delete file and then start recording again
#!/usr/bin/env python3
# LICENSE: GPL-3.0-or-later
# Copyright (C) 2025 Onyx and Iris
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
@onyx-and-iris
onyx-and-iris / owncloud_expiration.py
Last active March 25, 2025 16:00
Monkey Patches the owncloud.Client class to allow setting an expiration date on a file share link
"""
This script monkey patches owncloud.Client.share_file_with_link to add the expire_date parameter.
This script is a proof of concept and should not be used in production.
"""
import datetime
import os
from xml.etree import ElementTree as ET
@onyx-and-iris
onyx-and-iris / rcon.py
Last active March 11, 2025 20:39
Q3 Rcon CLI - single file, zero dependencies
#!/usr/bin/env python3
# MIT License
#
# Copyright (c) 2025 Onyx and Iris
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@onyx-and-iris
onyx-and-iris / launch.py
Created January 26, 2024 17:00
Voicemeeter Launcher
import logging
import os
import subprocess
import time
from pathlib import Path
import voicemeeterlib
logging.basicConfig(level=logging.DEBUG)
@onyx-and-iris
onyx-and-iris / source_projector.py
Last active October 10, 2023 19:43
Projects a source named "VSCode" in fullscreen to monitor identified by "AORUS FI27Q-X(0)"
import logging
import obsws_python as obs
logging.basicConfig(
level=logging.DEBUG,
)
def main():
@onyx-and-iris
onyx-and-iris / main.rb
Created August 3, 2023 11:46
Control Voicemeeter Gainlayers using Korg NanoControl2 sliders
require_relative "../../lib/voicemeeter"
class Main
GAINLAYER = 0
def initialize(vm)
@vm = vm
@vm.register(method(:on_midi)
end
import logging
import time
from pathlib import Path
import requests
from watchdog.events import FileSystemEventHandler
from watchdog.observers import Observer
logging.basicConfig(level=logging.INFO)
@onyx-and-iris
onyx-and-iris / recordstate.py
Last active December 7, 2022 17:50
toggles record state and prints event notifications
import time
import obsws_python as obs
def on_record_state_changed(data):
"""The state of the record output has changed."""
print(f"Current record state: {data.output_state}")
if data.output_state == "OBS_WEBSOCKET_OUTPUT_STARTED":