Skip to content

Instantly share code, notes, and snippets.

View onyx-and-iris's full-sized avatar
💭
Reading: Fluent Python 2e by Luciano Ramalho

Onyx and Iris onyx-and-iris

💭
Reading: Fluent Python 2e by Luciano Ramalho
View GitHub Profile
@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":
@onyx-and-iris
onyx-and-iris / sendtext.py
Last active February 5, 2025 09:52
Voicemeeter VBAN SendText 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 / vm_streamlabs_sync.py
Last active January 28, 2025 17:17
sync streamlabs scene switches to Voicemeeter states.
import asyncio
import logging
from collections import namedtuple
import voicemeeterlib
from pyslobs import ScenesService, config_from_ini_else_stdin, connection
class Observer:
"""
@onyx-and-iris
onyx-and-iris / appgain.ahk
Created July 24, 2022 22:05
adds increment and decrement volume function for app gain using VMR.ahk
#Include VMR.ahk
vm := new VMR().login()
vol := 0.5
vm.strip[6].AppGain := Format("(""Spotify"", {:.1f})", vol)
^a::
vol -= 0.1
vm.strip[6].AppGain := Format("(""Spotify"", {:.1f})", vol)
return