Skip to content

Instantly share code, notes, and snippets.

View ungeskriptet's full-sized avatar

David Wronek ungeskriptet

View GitHub Profile
@ungeskriptet
ungeskriptet / samfirm.py
Last active October 8, 2024 06:33
Samsung firmware downloader (warning! code quality isn't very good!)
#!/usr/bin/python -u
# Based on:
# https://github.com/DavidArsene/samfirm.js
# https://github.com/martinetd/samloader
# https://github.com/ysfchn/easyfirmware
from Cryptodome.Cipher import AES
from Cryptodome.Util.Padding import pad
from Cryptodome.Util.Padding import unpad
import base64
import hashlib
@ungeskriptet
ungeskriptet / README.md
Created August 17, 2024 13:13
WireGuard configs to bypass CGNAT

WireGuard configs to bypass CGNAT

This set of files will help you to connect to a network behind carrier-grade NAT using WireGuard. You'll be able to access the LAN of the WireGuard peer behind the CGNAT and route your entire internet traffic to it.

Setup

  • wireguard-hub.conf: This config is intended for the WireGuard peer that has access to a public IP address, e.g. VPS
  • openwrt.conf: This config is intended for the WireGuard peer behind the CGNAT, e.g. OpenWrt router or Raspberry Pi
  • client.conf: This config is inteded for a WireGuard peer that wants to access the LAN of the device behind the CGNAT and route its entire internet traffic to it, e.g. computer or mobile phone

Generating keys

#!/data/data/com.termux/files/usr/bin/bash
# Convert videos or GIFs into Telegram sticker compatible webm files
rm -rf $HOME/storage/downloads/output.webm
ffmpeg -y -i $1 -r 30 -t 2.99 -an -c:v libvpx-vp9 -pix_fmt yuva420p -vf 'scale=512:512:force_original_aspect_ratio=decrease' -b:v 400K $HOME/storage/downloads/output.webm
@ungeskriptet
ungeskriptet / archinstall.md
Last active February 20, 2025 09:51
My personal Arch Linux installation guide for an UEFI install UKI and optionally secure boot (archinstall.md)

David's personal Arch Linux installation guide

Note

This guide is meant for my personal use. If you're installing Arch Linux for the first time, please follow the official installation guide instead.

1. Flashing the ISO

  1. Download the latest ISO file from https://ftp.halifax.rwth-aachen.de/archlinux/iso/latest/archlinux-x86_64.iso
    • $ curl https://ftp.halifax.rwth-aachen.de/archlinux/iso/latest/archlinux-x86_64.iso -O
  2. Flash the ISO
    • $ cat archlinux-x86_64.iso | sudo tee /dev/sdX > /dev/null
  3. Verify the flashed image on the USB drive (optional)
@ungeskriptet
ungeskriptet / APKBUILD
Created April 1, 2024 07:01
Zmod Simply Love ITGmania theme APKBUILD for Alpine Linux
# Maintainer: David Wronek <[email protected]>
pkgname=itgmania-theme-zmod-simplylove
pkgver=0_git20240331
pkgrel=0
arch="noarch"
url="https://github.com/zarzob/Simply-Love-SM5"
pkgdesc="Zmod fork of Simply Love for ITGmania with BoogieStats integration"
license="GPL-3.0"
depends="itgmania"
_commit="108e06ec2f48023ad8e4b185e866fc3eb723a98c"
@ungeskriptet
ungeskriptet / 0001-Remove-__assert_fail-declaration.patch
Last active June 6, 2024 16:39
ITGmania APKBUILD for Alpine Linux
From 118daae7b4c50ec95f0a713521c2dec57993252c Mon Sep 17 00:00:00 2001
From: David Wronek <[email protected]>
Date: Sat, 30 Mar 2024 19:51:00 +0100
Subject: [PATCH 1/3] Remove __assert_fail declaration
This functions causes errors when building on Alpine Linux.
---
src/archutils/Unix/AssertionHandler.cpp | 22 ----------------------
1 file changed, 22 deletions(-)
@ungeskriptet
ungeskriptet / command.txt
Created February 12, 2024 19:10
Dump regulators from Android with root
cd /sys/class/regulator; for i in $(ls); do cat $i/name; [ -f "$i/max_microvolts" ] && echo "$i/name" || echo "$i/name\n"; [ -f "$i/min_microvolts" ] && cat $i/min_microvolts && echo "$i/min_microvolts"; [ -f $i/max_microvolts ] && cat $i/max_microvolts && echo "$i/max_microvolts\n"; done
@ungeskriptet
ungeskriptet / alpine-bootstrap-install.txt
Last active June 9, 2024 10:14
Installing Alpine Linux "the Arch way"
# Installing Alpine Linux "the Arch way" by bootstrapping a chroot
# This sequence of commands will setup a sys install with edge repos for an EFI system
# Setup internet connection and keyboard layout
# Exit with Ctrl+C once it asks you to change the root password
setup-alpine
# Create 512 MiB EFI boot partition and rootfs partition
apk add sfdisk e2fsprogs
sfdisk /dev/vda
@ungeskriptet
ungeskriptet / firetv_debloater.sh
Last active June 9, 2023 15:16
Amazon Fire TV Stick debloater (Tested with Fire OS 7.6.2.4)
#!/usr/bin/sh
set -e
TEMP_DIR=aftv-tcl-debloater
KODI_URL=https://mirrors.kodi.tv/releases/android/arm/kodi-20.1-Nexus-armeabi-v7a.apk
FLAUNCHER_URL=https://gitlab.com/flauncher/flauncher/-/releases/0.18.0/downloads/flauncher-0.18.0.apk
LM_URL=https://forum.xda-developers.com/attachments/lm-fos-1-1-8-apk.5862251
BLOAT=$(cat <<EOF
com.amazon.alexamediaplayer.runtime.ftv
com.amazon.net.smartconnect
com.amazon.tv.resolutioncycler
@ungeskriptet
ungeskriptet / prgmMATH.txt
Created May 18, 2023 15:14
prgmMATH - A program full of formulas for a perfect math class
Degree
Lbl 0
ClrHome
Menu("SEITE 1/1","STOCHASTIK",1,"DREIECK",4,"BEENDEN",7
Lbl 7
Return
Lbl 1
ClrHome
Menu("STOCHASTIK","MULTIPLIKATION",2,"ADDITION",3,"ZURUCK",0
Lbl 2