Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Drinking beers, hunting deers.

Petr Štetiar ynezz

💭
Drinking beers, hunting deers.
View GitHub Profile
@ynezz
ynezz / nvrammanager.c
Last active Apr 9, 2021
TP-Link Archer C7 v5 EU nvrammanager nm_checkSoftVer() dissasembly
View nvrammanager.c
/*
root@ArcherC7v5:/# nvrammanager -r /proc/self/fd/1 -p soft-version
soft_ver:1.1.0 Build 20201120 rel.50406
fw_id:C339BA6D3F263C8AB6919A76DF430336
root@ArcherC7v5:/# md5sum /usr/bin/nvrammanager
404b8d952f7cdc97199a0afc2e081a9a /usr/bin/nvrammanager
*/
int nm_checkSoftVer(int param_1,int param_2)
@ynezz
ynezz / docker-compose.yml
Created Jan 22, 2021
OpenWrt staging builds on GitLab with autoscaling VPSes on Hetzner Cloud
View docker-compose.yml
version: '2'
services:
hetzner-runner:
image: mawalu/hetzner-gitlab-runner:latest
volumes:
- "./hetzner_config:/etc/gitlab-runner"
@ynezz
ynezz / pgp-key-info.txt
Last active Feb 21, 2020
My current PGP key 0x1F2152094BA2692F
View pgp-key-info.txt
pub rsa4096/0x1F2152094BA2692F 2020-02-21 [C]
Key fingerprint = 78B6 D91C C095 5D00 7EC7 40AC 1F21 5209 4BA2 692F
uid [ultimate] Petr Štetiar (ynezz) <ynezz@true.cz>
uid [ultimate] Gaben Štetiar Petr (Gaben) <petr.stetiar@gaben.cz>
sub rsa4096/0x58EE120F30CC02D3 2020-02-21 [S] [expires: 2022-02-20]
sub rsa4096/0x0910E6576EDCCD48 2020-02-21 [E] [expires: 2022-02-20]
sub rsa4096/0x64999F01767C69FF 2020-02-21 [A] [expires: 2022-02-20]
@ynezz
ynezz / test-lnum.lua
Created May 17, 2019
Lua number parsing test cases
View test-lnum.lua
local test_cases = {
{ 0x7fffffff, "2147483647" },
{ 2147483647, "2147483647" },
{ 0xffffffff, "4294967295" },
{ 4294967295, "4294967295" },
{ 0x7fffffffffffffff, "9.2233720368548e+18" },
{ 9223372036854775807, "9.2233720368548e+18" },
@ynezz
ynezz / mikrotik-routerboard-product-codes.txt
Created Mar 24, 2019
MikroTik RouterBOARD product codes
View mikrotik-routerboard-product-codes.txt
RB912UAG-6HPnD-OUT
RBcAPGi-5acD2nD
RBDiscG-5acD
RBDynaDishG-6HnD
RBD52G-5HacD2HnD-TC
RB760iGS
RBLDF-2nD
RBLDFG-5acD
RBLHG-2nD
RBLHGR&R11e-4G
@ynezz
ynezz / debian-live-create-usb-key.sh
Last active Oct 26, 2020
UEFI + BIOS bootable live Debian with persistence
View debian-live-create-usb-key.sh
#!/bin/bash
if [[ ${EUID} -ne 0 ]]; then
echo "this script must be executed with elevated privileges"
exit 1
fi
iso=$1
dev=$2
@ynezz
ynezz / Makefile
Last active Jan 31, 2017
Makefile for building OpenResty from source
View Makefile
OR_VERSION ?= 1.11.2.2
OR_DL_URL ?= https://openresty.org/download/
OR_SRC_DIR ?= openresty-$(OR_VERSION)
OR_TGZ ?= $(OR_SRC_DIR).tar.gz
OR_PREFIX ?= /opt/openresty/local
OR_PREPARED ?= $(OR_SRC_DIR)/.prepared
OR_VERIFIED ?= $(OR_SRC_DIR)/.verified
OR_PGP_KEY := A0E98066
OR_PGP_FP := 2545 1EB0 8846 0026 195B D62C B550 E09E A0E9 8066
OR_ENV ?= env-openresty-$(OR_VERSION)
@ynezz
ynezz / openmesh-gpl-compliance.md
Last active Oct 7, 2017
OpenMesh released source code for GPL copyrighted parts
View openmesh-gpl-compliance.md

Sent via support portal on November 18th, 2016

Dear OpenMesh support,

I would like to kindly ask you for source code of software components you're distributing in binary form in your 6.1.1 firmware in your OM5P-ACv2 and MR1750 products which I've bought recently. I'm mainly interested in source code of U-Boot bootloader and Linux kernel parts, both are licensed to OpenMesh under GNU Public License.

Providing customers with the source code, along with any modifications, is a requirement of the GNU Public License http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html (please see section 3).

> BTW, there is nice vendor FAQ for GNU Public License compliance http://gpl-violations.org/faq/vendor-faq/

@ynezz
ynezz / 0001-kernel-Add-spidev-patch-to-silence-warning-about-spi.patch
Last active Dec 12, 2016
[PATCH] kernel: Add spidev patch to silence warning about spidev listing in DT
View 0001-kernel-Add-spidev-patch-to-silence-warning-about-spi.patch
From c80d1a185cde478243f19f410ac0fb06769f6c33 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz@true.cz>
Date: Tue, 12 Jul 2016 12:31:55 +0200
Subject: [PATCH] kernel: Add spidev patch to silence warning about spidev
listing in DT
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ 32.836659] spidev spi0.0: buggy DT: spidev listed directly in DT