Skip to content

Instantly share code, notes, and snippets.

@woctezuma
woctezuma / steamspy.py
Last active July 15, 2023 20:25
Respect rate-limits of SteamSpy API
import json
import time
from pathlib import Path
import steamspypi
def get_cooldown():
cooldown = 70 # 1 minute plus a cushion
@fxthomas
fxthomas / gnome-inhibit
Last active July 5, 2024 02:57
Inhibit gnome screensaver for a given program
#!/bin/bash
# Note: Doesn't work anymore (at least for Gnome 3.34, possibly later; see Python script instead)
# Usage: gnome-inhibit <command-line>
# Example: gnome-inhibit mpv video.mp4
cookie=$(dbus-send \
--session \
--dest=org.freedesktop.ScreenSaver \
--type=method_call \
--print-reply=literal \