Skip to content

Instantly share code, notes, and snippets.

View franga2000's full-sized avatar

Miha Frangež franga2000

View GitHub Profile
@franga2000
franga2000 / marprom.schema.json
Created December 24, 2022 15:55
marprom.schema.json
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$ref": "#/definitions/Welcome9",
"definitions": {
"Welcome9": {
"type": "object",
"additionalProperties": false,
"properties": {
"Response": {
"$ref": "#/definitions/Response"
#!/bin/bash
#
# 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

Example: https://vodstr.rtvslo.si/encrypted05/_definst_//2018/12/21/174584131.smil/chunklist_w1881490815_b1800000.m3u8?keylockhash=BoyBlrQaOuIS-M1dIJWPin1ZErxDmzOWONB75xKL2c0

  1. Download that file and save it here as list.m3u
@franga2000
franga2000 / ADE_screencap.py
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
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==
#!/bin/bash
#
# REALLY SHITTY SCRIPT to download BigBlueButton recording
# (this does not record BBB presentations, just archives already recorded ones)
#
# Requires wget, jq (https://stedolan.github.io/jq/) and xq (https://github.com/kislyuk/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.).
#
"""
STEAM GAME MATCHER SCRIPT
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 (steamcommunity.com/id/my_name) can be entered as my_name, users without vanity URLs (steamcommunity.com/profile/1234567) 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):
pass
/dts-v1/;
/plugin/;
/ {
compatible = "allwinner,sun8i-h3";
fragment@0 {
target = <&spi0>;
__overlay__ {
status = "okay";
@franga2000
franga2000 / whydididothis.sh
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.