Skip to content

Instantly share code, notes, and snippets.

View franga2000's full-sized avatar

Miha Frangež franga2000

View GitHub Profile
/dts-v1/;
/plugin/;
/ {
compatible = "allwinner,sun8i-h3";
fragment@0 {
target = <&spi0>;
__overlay__ {
status = "okay";
from requests import Session
import pickle
import os
from os import path
from sys import exit
from getpass import getpass
class BNNotAuthenticatedException(Exception):
pass
"""
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.
#!/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.).
#
@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==
@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

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
#!/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
@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"