Skip to content

Instantly share code, notes, and snippets.

@Frixuu
Frixuu / load_python.py
Last active March 26, 2024 01:11
How to make Ren'Py 8 load raw Python files from .rpa archives
import renpy.loader
from importlib.machinery import ModuleSpec
from types import ModuleType
from typing import Any, List, Optional, Union
class DummyLoader:
def __init__(self) -> None:
@Frixuu
Frixuu / imgurtime.sh
Last active April 23, 2019 09:50
Gets Imgur's image upload date. Needs to have API key registered.
#!/bin/sh
if [ $# -ne 2 ]
then
echo Usage: $0 imgur_client_id image_hash
exit 1
fi
url="https://api.imgur.com/3/image/"$2
header="\"Authorization: Client-ID "$1"\""
@Frixuu
Frixuu / getsong.sh
Created May 19, 2017 21:17
Prints song currently playing in either Spotify or cmus.
#!/bin/sh
# cmus part by github user ronno
# spotify part adapted from github user flymia
spotifyid=$(ps -ef | grep '[/]usr/share/spotify' | awk '{print $2}' | head -1)
if [ -z "$spotifyid" ]; then
if ps -C cmus > /dev/null; then
artist=`cmus-remote -Q |
grep --text '^tag artist' |