Skip to content

Instantly share code, notes, and snippets.

View franga2000's full-sized avatar

Miha Frangež franga2000

View GitHub Profile
franga2000 / marprom.schema.json
Created December 24, 2022 15:55
"$schema": "",
"$ref": "#/definitions/Welcome9",
"definitions": {
"Welcome9": {
"type": "object",
"additionalProperties": false,
"properties": {
"Response": {
"$ref": "#/definitions/Response"
# Discord will not launch if it detects it's outdated.
# Since packages sometimes take a day or two to get updated, this script will trick it into launching anyways.
# Of course, you should still install an update as soon as it0s available.
# This script requires: curl, jq
# optional: sudo or polkit
set -e

Manually downloading from RTV 4D

  1. Open devtools and refresh the video page

  2. Take playlist URL from devtools


  1. Download that file and save it here as list.m3u
franga2000 /
Created February 7, 2021 19:24
Capture screenshots from Adobe Digital Editions
import os
import sys
import time
from pathlib import Path
import pyautogui
from ewmh import EWMH
# Utility functions
franga2000 / tabbytools.userscript.js
Created January 9, 2021 08:47
A collection of horrible hacks for lazy tabmasters
// ==UserScript==
// @name Tabbycat tools
// @match http*://tab*.*/*
// @grant unsafeWindow
// @grant GM_registerMenuCommand
// @version 1.0
// @author franga2000
// @description A collection of horrible hacks for lazy tabmasters
// ==/UserScript==
# REALLY SHITTY SCRIPT to download BigBlueButton recording
# (this does not record BBB presentations, just archives already recorded ones)
# Requires wget, jq ( and xq ( to be installed.
# This script downloads only the resources for a particular presentation without the playback code. That you can get by doing a HAR capture from Firefox and giving it to the command at the bottom of this file.
# This also works if a download is missing some extra features (polls, etc.).
by franga2000
Users can be given as command line parameters. If no parameters are given, you will be prompted to type them in.
Users with vanity URLS ( can be entered as my_name, users without vanity URLs ( can be entered as #1234567.
(Be careful to enclose numeric ids in single quotes when entering as command line parameters, so the # isn't interpreted as a comment)
A Steam API key should be provided in the environment variable STEAM_API_KEY.
from requests import Session
import pickle
import os
from os import path
from sys import exit
from getpass import getpass
class BNNotAuthenticatedException(Exception):
/ {
compatible = "allwinner,sun8i-h3";
fragment@0 {
target = <&spi0>;
__overlay__ {
status = "okay";
franga2000 /
Created May 8, 2019 22:39
Quite possibly the most horrific command I have ever written
# This is quite possibly the most horrific command I have ever written
# So... There's this thing (code-server) that runs in a Docker container.
# For some reason, the Dockerfile creates a new user for itself with the UID 1000 and that is the only UID it can properly run as.
# If I try to run it with a different UID (--user), it complains because it can't access a whole bunch of stuff.
# But I need it to run under UID 1001 and also be in the www-data group.
# So, in short:
# First, I give the container all privileges and mount the FUSE device so I can use bindfs.
# I mount the dir I want into ~/project_real set the entrypoint to a shell.