Skip to content

Instantly share code, notes, and snippets.

View ungeskriptet's full-sized avatar

David Wronek ungeskriptet

View GitHub Profile
@ungeskriptet
ungeskriptet / configuration.nix
Created July 21, 2025 19:41
NixITG proof of concept
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, lib, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
{pkgs ? import <nixpkgs> {}}: let
fixWrapper = pkgs.runCommand "fix-wrapper" {} ''
mkdir -p $out/bin
for i in ${pkgs.gcc.cc}/bin/*-gnu-gcc*; do
ln -s ${pkgs.gcc}/bin/gcc $out/bin/$(basename "$i")
done
for i in ${pkgs.gcc.cc}/bin/*-gnu-{g++,c++}*; do
ln -s ${pkgs.gcc}/bin/g++ $out/bin/$(basename "$i")
done
ln -sf ${pkgs.gcc.cc}/bin/{,*-gnu-}gcc-{ar,nm,ranlib} $out/bin
@ungeskriptet
ungeskriptet / freetz-ng-shell.nix
Last active June 29, 2025 12:56
freetz-ng-shell.nix
{pkgs ? import <nixpkgs> {}}:
let
fhs = pkgs.buildFHSEnv {
name = "freetz-env";
targetPkgs = pkgs:
with pkgs; [
autoconf
automake
bash
bc
@ungeskriptet
ungeskriptet / fritz_landevices_cleanup.py
Created January 16, 2025 19:01
FRITZ!Box cleanup script
from requests import get, post, put
from time import sleep
import hashlib
import xml.etree.ElementTree as ET
URL = 'https://fritz.box/login_sid.lua?version=2'
USERNAME = 'user'
PASSWORD = 'password'
def main():
@ungeskriptet
ungeskriptet / selinux.sh
Created January 11, 2025 20:44
I refuse to elaborate
#!/vendor/bin/sh
/system/bin/magiskpolicy --live "allow dumpstate cameraserver_exec file *"
/system/bin/magiskpolicy --live "allow dumpstate * * *"
/system/bin/magiskpolicy --live "allow dumpstate charon_exec file *"
/system/bin/magiskpolicy --live "allow dumpstate connfwexe_exec file *"
/system/bin/magiskpolicy --live "allow dumpstate credstore_exec file *"
/system/bin/magiskpolicy --live "allow dumpstate ddexe_exec file *"
/system/bin/magiskpolicy --live "allow dumpstate dhkprov_exec file *"
/system/bin/magiskpolicy --live "allow dumpstate dmesgd_exec file *"
/system/bin/magiskpolicy --live "allow dumpstate dnsmasq_exec file *"
@ungeskriptet
ungeskriptet / pixelpitch.py
Created December 22, 2024 16:46
Pixel pitch calculator (for Android)
#!/usr/bin/python
from math import trunc
import sys
if len(sys.argv) <= 1:
print('pixelpitch.py <width> <height> <size in inch>')
quit()
width = float(sys.argv[1])
height = float(sys.argv[2])
@ungeskriptet
ungeskriptet / samsung-inquiry.py
Last active August 25, 2025 16:44
Samsung inquiry script
#!/usr/bin/env python3
from selenium.common.exceptions import NoSuchElementException
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import Select
from selenium.webdriver.support.ui import WebDriverWait
import requests
import sys
@ungeskriptet
ungeskriptet / unlearningapps.py
Last active November 28, 2024 19:15
Get solutions for a LearningApp on learningapps.org. Not all app types are supported. (Code explained: https://youtu.be/3K3MMtoG8rY)
#!/usr/bin/python3
import json
import requests
import sys
from urllib.parse import unquote
# Usage: python unlearningapps.py <ID>
# You can get the ID from the URL or
# by observing the network tab in your
# browser if it is embedded
@ungeskriptet
ungeskriptet / ia-check.py
Last active November 21, 2024 07:09
Python script to skip already uploaded files in an item on archive.org
#!/usr/bin/python
from internetarchive import upload
from random import randint
from requests import get
import hashlib
import sys
def info(text): print(f"\033[94mINFO: \033[00m{text}")
def warning(text): print(f"\033[93mWARNING: \033[00m{text}")
@ungeskriptet
ungeskriptet / termux-url-opener
Last active February 5, 2025 13:40
My personal termux-url-opener script
#!/data/data/com.termux/files/usr/bin/bash
function init() {
yes | pkg update
pkg upgrade -y
pkg install -y ffmpeg jq python-pip termux-api which vim openssh dnsutils traceroute iproute2 file
pip install yt-dlp
while [ ! -d "/data/data/com.termux/files/home/storage/pictures" ]; do
echo "Waiting for permissions to be granted"
termux-setup-storage