Skip to content

Instantly share code, notes, and snippets.

View zer0def's full-sized avatar

‍^‍\‍‍.‍‍z‍‍e‍‍r‍‍0‍‍d‍‍e‍‍(‍‍?‍‍:‍‍a‍‍|‍‍r‍‍?‍‍p‍‍)‍‍?‍‍(‍‍?‍‍:‍‍t‍‍h‍‍|‍‍f‍‍|‍‍v‍‍)‍‍$‍‍ zer0def

View GitHub Profile
#!/bin/sh
set -e
#set -x
hex2bin(){ local i; for i in $(echo -n "${1}" | fold -w2); do printf '%b' "\0$(printf '%o' "0x${i}")"; done; }
#hex2bin(){ echo -n "${1}" | fold -w2 | xargs -I@ -- printf '\x@'; }
#hex2bin(){ local i; for i in $(seq 0 2 $((${#1}-1))); do printf "\x${1:${i}:2}"; done; }
usage(){ echo "${0##*/} [-l local_port] [-h stuh_server_host] [-p stun_server_port]"; exit 1; }
#_awk="$(command -v gawk || command -v awk)"
@zer0def
zer0def / SystemlessMindTheGApps.md
Last active August 13, 2023 12:43
SystemlessMindTheGApps

Just pop this into your OTA.

@zer0def
zer0def / generate-squashed-patch.sh
Last active June 30, 2024 10:39 — forked from thestinger/gmscompat-commits.md
Sandboxed Google Play compatibility layer commits
#!/bin/sh -ex
_head="$(git rev-parse --abbrev-ref HEAD)"
git checkout "$(git log --format=oneline "${_head}" | awk '/ gmscompat: / {print $1}' | tac | head -n1)^"
for i in $(git log --format=oneline "${_head}" | awk '/ gmscompat: / {print $1}' | tac); do # | xargs -n1 -- git cherry-pick -n
git cherry-pick -n "${i}" || git mergetool
done
git commit -m 'squashed gmscompat patch'