Skip to content

Instantly share code, notes, and snippets.

View programminghoch10's full-sized avatar
:octocat:

programminghoch10

:octocat:
View GitHub Profile
@programminghoch10
programminghoch10 / ReactivationLockBypass.md
Created December 3, 2025 16:27
Samsung Galaxy Note 4 Samsung Account Reactivation Lock Bypass
  1. Downgrade phone to KitKat (4.4.4)
  2. Enter settings and enable ADB
    1. When in samsung account setup, enter text, select text and click on dictionary
    2. Press back and select "Internet Search" on the bottom
    3. In google, remove search terms and search for "Settings" app instead
      If it doesnt work, connect wifi and reboot so that google app can update in background.
    4. enable developer options and enable adb
    5. connect to computer using adb
      if the authorization prompt doesnt show up, go back to settings main page and try switching between simple and normal launcher modes few times
@programminghoch10
programminghoch10 / whatsapp-viewonce.sh
Created September 12, 2025 12:09
WhatsApp ViewOnce Magisk Script
#!/bin/sh
# regurarily copy WhatsApp ViewOnce images into sdcard
while true; do
sleep 60
[ "$(ls /data/data/com.whatsapp/files/ViewOnce | wc -l)" -eq 0 ] && continue
mkdir -p /sdcard/Pictures/WhatsApp/ViewOnce
cp -d -u -p /data/data/com.whatsapp/files/ViewOnce/* -t /sdcard/Pictures/WhatsApp/ViewOnce
done
@programminghoch10
programminghoch10 / mintedcleverref.tex
Created February 23, 2025 14:45
LATeX Minted Cleverref Line Numbers
% insert these two lines after your \usepackage{cleveref}
% then use \mintedlinelabel{labelname} inside the minted file using the "escapeinside" minted option
% then \cref and deriviates should correctly reference as "line x"
\newcounter{line}
\newcommand{\mintedlinelabel}[1]{\setcounter{line}{\value{FancyVerbLine}}\addtocounter{line}{-1}\refstepcounter{line}\label{#1}}
@programminghoch10
programminghoch10 / RipDVDsusingFFmpeg.md
Last active September 17, 2024 10:44
Rip DVDs using FFmpeg

Rip DVDs using FFmpeg

This Gist provides an easy to use script for ripping DVDs using FFmpeg.

Install

Install ffmpeg, libdvdcss2 and lsdvd on your system.

@programminghoch10
programminghoch10 / lsdvdjson.sh
Created September 12, 2024 17:33
lsdvd output as JSON
lsdvd -x -Oy | sed -e 's/^lsdvd = //' -e "s/'/\"/g" | tr -d '\n'| sed -e 's/,\s*}/}/g' -e 's/,\s*]/]/g'
@programminghoch10
programminghoch10 / android_external_protobuf.patch
Created August 8, 2024 15:58
statically linked aapt2 binary for android
diff --git a/Android.bp b/Android.bp
index a2a2cbdc8..16dc0e699 100644
--- a/Android.bp
+++ b/Android.bp
@@ -252,7 +252,7 @@ cc_library {
target: {
android: {
static: {
- enabled: false,
+ enabled: true,
@programminghoch10
programminghoch10 / remove-mkvmerge-statistics-metadata.md
Last active December 7, 2024 16:32
remove mkvmerge statistics metadata

After mkvmerge processed an mkv file, all streams have a lot of statistics metadata tagged onto them.

For example:

Stream #0:27: Subtitle: hdmv_pgs_subtitle
    Metadata:
      BPS-eng         : 40153
      DURATION-eng    : 02:26:34
      NUMBER_OF_FRAMES-eng: 3294
      NUMBER_OF_BYTES-eng: 34073971
@programminghoch10
programminghoch10 / FFmpegISOlanguagecodesforJellyfin.md
Last active December 7, 2024 16:29
FFmpeg ISO language codes for Jellyfin

Jellyfin uses only ISO 639-2 language codes to translate the metadata tag eng to English for the track selector.

For some languages multiple such tags exist, for example Germany has ger and deu. Here only the tag deu is correctly translated to German whilst ger remains unrecognized.

mkvmerge always replaces the language codes with the matroska specified set of langauge codes, which sadly are the wrong ones for Jellyfin.

As an end user one can use ffmpeg to rewrite the metadata language tags to the correct set for Jellyfin.

@programminghoch10
programminghoch10 / semlock.sh
Last active September 7, 2025 11:52
Simple bash script parallelization using semaphores
#!/bin/bash
SEMPATH="/tmp"
SEMNAME=""
semtake() {
local name="$1"
[ -z "$name" ] && echo "Missing semaphore name!" && return 1
local j="$2"
[ -z "$2" ] && j=$(nproc)
@programminghoch10
programminghoch10 / torsocksmulticore.sh
Last active February 12, 2023 15:11
Multi-Core Torsocks
#!/bin/bash
# TorSocksMultiCore
# a wrapper for torsocks for multicore tor execution
#
# This script starts a new tor daemon everytime it is invoked.
# This way every command or shell will have it's own tor daemon.
# The usage is functionally equivalent to torsocks itself.
#