Skip to content

Instantly share code, notes, and snippets.

@Romern
Romern / 0002-do-not-replace-playlist.patch
Created August 18, 2019 15:12
Patch to default "drag-and-drop"-ing of files onto mpv's window will add it to the playlist instead of replacing it. When I want to replace it, I usually just close the window and open the files in a new mpv session, so I don't see the point really
--- a/video/out/x11_common.c 2019-08-18 17:07:38.048011729 +0200
+++ b/video/out/x11_common.c 2019-08-18 17:05:50.504672000 +0200
@@ -920,7 +920,7 @@
if (prop) {
enum mp_dnd_action action =
x11->dnd_requested_action == XA(x11, XdndActionCopy) ?
- DND_REPLACE : DND_APPEND;
+ DND_APPEND : DND_REPLACE;
char *mime_type = x11_dnd_mime_type(x11, x11->dnd_requested_format);
@Romern
Romern / velocity.py
Created September 20, 2019 13:33
velocity api
import requests
import json
#Station 53 ist Mörgensstraße
baseurl = "https://cms.velocity-aachen.de/backend"
def login(email, password):
#Login:
param = {"j_username": email,
\documentclass{exercisesheet}
\newcommand{\BlattNr}{1}
\title{Vorlesung, Übung \BlattNr}
\author{
Max Mustermann \\ 123456
\and
Erika Musterfrau \\ 123457
\and
Spock \\ 694200
}
02-06 21:31:14.049 3770 6135 I ActivityManager: Start proc 26859:com.tier.app/u0a37 for activity com.tier.app/.ui.splash.SplashActivity
02-06 21:31:14.436 26859 26876 W DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
02-06 21:31:14.471 26859 26881 W DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
02-06 21:31:14.481 26859 26881 I FirebaseAuth: [FirebaseAuth:] Preparing to create service connection to gms implementation
02-06 21:31:14.504 26859 26859 I FirebaseInitProvider: FirebaseApp initialization successful
02-06 21:31:14.620 26859 26886 I FA : App measurement is starting up, version: 19000
02-06 21:31:14.620 26859 26886 I FA : To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
02-06 21:31:14.621 26859 26886 I FA : To enable faster debug mode event logging run:
02-06 21:31:14.621 26859 26886 I FA : adb shell setprop debug.firebase.analytics.app com.tier.app
02-06 21:31:14.635 26859 26859 I Cras
import requests, pickle
from bs4 import BeautifulSoup as bs
import os
import unicodedata
import string
import re
from contextlib import closing
import urllib.parse
import youtube_dl
import json
@Romern
Romern / spatula-examples.md
Last active February 12, 2025 22:35
Goog-Spatula Header Stuff
import logging
#import subprocess
from datetime import datetime, timedelta
from telegram.ext import CommandHandler, Updater, filters, MessageHandler
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO)
logger = logging.getLogger(__name__)
updater = Updater(token=TOKEN', use_context=True)
dispatcher = updater.dispatcher
@Romern
Romern / downloadSiteFromArchive.sh
Created June 16, 2020 13:49
Bash script which downloads files from archive.org
#!/bin/bash
if [ $# -le 0 ]; then
echo "Usage: $0 url (outputfilename)"
exit
fi
if [ $# -eq 2 ]; then
outputfilename="--output-document=$2"
fi
import string
input_scrambled = open("input.txt","r").read().replace("\n"," ").split(" ")
wordlist = open("wordlist-german.txt","r").read().split("\n")
wordlist = [w.lower() for w in wordlist]
wordlist_dict = {}
for w in wordlist:
for a in w:
if a not in wordlist_dict:
wordlist_dict[a] = set()
@Romern
Romern / athene.xml
Created September 17, 2020 11:23
LineageOS4MicroG Moto G4 Build Instructions
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="Gardens-Network/vendor_motorola_athene" path="vendor/motorola/athene" remote="github" revision="lineage-16.0" />
<project name="Gardens-Network/kernel_motorola_msm8952" path="kernel/motorola/msm8952" remote="github" revision="crdroid-9" />
<project name="Gardens-Network/device_motorola_athene" path="device/motorola/athene" remote="github" revision="lineage-16.0" />
<remove-project name="LineageOS/android_vendor_qcom_opensource_data-ipa-cfg-mgr"/>
</manifest>