Skip to content

Instantly share code, notes, and snippets.

View z3ntu's full-sized avatar

Luca Weiss z3ntu

View GitHub Profile
@z3ntu
z3ntu / recovery.log
Created December 10, 2016 17:05
Recovery log with Stock Fairphone Open updater with TWRP 3.0.2-0
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
Starting TWRP 3.0.2-0-bb0da94f on Thu Jan 22 05:21:29 1970
(pid 219)
I:Lun file '/sys/class/android_usb/android0/f_mass_storage/lun0/file' does not exist, USB storage mode disabled
I:Found brightness file at '/sys/class/leds/lcd-backlight/brightness'
I:Got max brightness 255 from '/sys/class/leds/lcd-backlight/max_brightness'
I:TWFunc::Set_Brightness: Setting brightness control to 255
I:LANG: en
@z3ntu
z3ntu / gist:24d478a9453c592db4a777607b641985
Created November 29, 2016 10:35
get newest nvidia version for linux
curl -s http://www.nvidia.com/object/unix.html | grep "Latest Long Lived Branch version" | cut -d '>' -f 2 | cut -d '<' -f 1
@z3ntu
z3ntu / gist:c5ca8f6040d8934fafc5e686b234890e
Last active October 28, 2023 20:39
openrazer fake driver commands
# one tab
mkdir -p /tmp/daemon_stuff/{,data,logs}; mkdir -p /tmp/daemon_test
./scripts/create_fake_device.py --dest /tmp/daemon_test --all
./scripts/create_fake_device.py --dest /tmp/daemon_test razerdeathadderchroma
# other tab
systemctl --user stop openrazer-daemon.service
openrazer-daemon -F --verbose --run-dir /tmp/daemon_stuff/data --log-dir /tmp/daemon_stuff/logs --test-dir /tmp/daemon_test
# run from source from testdata
PYTHONPATH="pylib:daemon" python3 ./daemon/run_openrazer_daemon.py -Fv --run-dir /tmp/daemon_stuff/data --log-dir /tmp/daemon_stuff/logs --test-dir /tmp/daemon_test --config=$PWD/daemon/resources/razer.conf
@z3ntu
z3ntu / README.md
Last active November 21, 2016 13:30
Fairphone 2 AOSP 5.1 build debugging

Fairphone 2 AOSP 5.1 build debugging

Download https://private.z3ntu.xyz/fairphone/AOSP_5.1.1_build_blobfree.zip

Flash it in the recovery (also run all adb commands in the recovery, my/stock TWRP build from https://private.z3ntu.xyz/fairphone/TWRP_3.0.2-0.img works pretty well as adb is fixed)

Boot -> adb shell -> "CANNOT LINK EXECUTABLE DEPENDENCIES: library "libNimsWrap.so" not found" (not even adb shell works without that library)

(from the folder vendor/qcom/proprietary/target/product/FP2/system from the FP Open 16.10 blobs)

@z3ntu
z3ntu / stuff.md
Last active July 25, 2017 09:22
arm kernel stuff (& qualcomm stuff)

fdt/dtb(I think they're synonyms) are just the default devicetree stuff for booting a kernel on ARM. but the thing is that a fdt is ONE fdt, and as you may know there are usually tons of them for all inds of hardware variants and the bootloader has to select the correct one

and there are two methods: appendet fst, where all fdt's are appended next to each other behind the kernel image

and qcdt, where all fdt's are packed together in a dt.img and indexed so the bootloader doesn't have to parse them to find the correct id's

Huge thanks to @m1cha for explaining this to me on Slack (I corrected some minor spelling mistakes)

@z3ntu
z3ntu / README.md
Last active April 4, 2024 23:32
KDE 1 Arch Linux install guide
@z3ntu
z3ntu / natron.PKGBUILD
Created October 13, 2016 14:57
natron 2.1.5 updates
diff --git a/PKGBUILD b/PKGBUILD
index b696df6..b92087c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer : Özgür Sarıer <echo b3pndXJzYXJpZXIxMDExNjAxMTE1QGdtYWlsLmNvbQo= | base64 -d>
pkgname=natron
-pkgver=2.1.2
+pkgver=2.1.5
@z3ntu
z3ntu / sysbench.md
Last active May 25, 2020 15:44
Sysbench values for my different computers/servers

Sysbench benchmarks

Tested with sysbench 0.4.12 (Command: sysbench --test=cpu --num-threads=$numThreads run)

HP ProBook

CPU: Intel(R) Core(TM) i5-4200M CPU @ 2.50GHz

  • 1 thread: 10.3467s
  • 4 threads: 2.9861s
  • 8 threads: 3.0074s

My computer at home

@z3ntu
z3ntu / sysbench.md
Last active June 26, 2016 19:39
Sysbench comparison for the Raspberry Pi

Raspberry Pi Sysbench benchmark

Software: sysbench 0.4.12

Command:

sysbench --test=cpu run

OS: Arch Linux ARM

Raspberry Pi 1 B

@z3ntu
z3ntu / bdae.md
Created June 7, 2016 08:00
Gangstar: Miami Vindication game file research (mostly .bdae right now)
Offset Type Description
0x00 char[4] String "BRES" in ASCII (42 52 45 53)
0x04 u16 Byte order mark (BOM) apparently. 0xFE,0xFF for little endian
0x06 u16 Padding //(usually 0x0000)?
0x08 u32 3C 00 00 00
0x0c u16 Length of file in bytes.
0x0e ? ?
Beginning with 0x0e there are alternating 2 bytes 0x0000 and some kind of u16 value which is mostly just incrementation...