Skip to content

Instantly share code, notes, and snippets.

@adamgerhartz
adamgerhartz / obs_media_switcher.py
Created March 4, 2024 08:06
OBS media looper and scene switcher
# requires the obs-websocket-py python library
import obswebsocket
import time
from obswebsocket import obsws, requests
queue = [
"name of scene 1",
"name of scene 2",
"name of scene 3",
"name of scene 4",
@adamgerhartz
adamgerhartz / measure_command.sh
Last active September 20, 2025 05:48
Bash script to measure another command's duration.
#!/bin/bash
START=$(date +%s)
# Add the command/process here that you want to measure
END=$(date +%s)
SECONDS=$((END - START))
echo "The process took ${SECONDS} seconds to complete."