Skip to content

Instantly share code, notes, and snippets.

View dawidd6's full-sized avatar
:shipit:

Dawid Dziurla dawidd6

:shipit:
  • Poland
  • 15:00 (UTC +02:00)
View GitHub Profile
@dawidd6
dawidd6 / readme.md
Last active August 19, 2025 06:07
How to debrick ASUS RT-AX59U
  1. Power off the router by simply clicking the button.
  2. Hold Reset button and click power button at the same time.
  3. Wait for the device to start blinking purple/magenta LED.
  4. Connect PC to LAN1 port.
  5. Set PC static IP to 192.168.1.2/255.255.255.0.
  6. Run on PC: curl --tftp-blksize 512 -T RT-AX59U_3.0.0.4_388_33911-gf36c0bb.trx tftp://192.168.1.1.
  7. Wait for router to stop flashing color LEDs and boot back up.

The .trx image is downloadable on vendor website.

@dawidd6
dawidd6 / lua-5.3.6.patch
Created December 4, 2020 19:56
Homebrew on Linux
diff --git a/Makefile b/Makefile
index 7fa91c8..dccf485 100644
--- a/Makefile
+++ b/Makefile
@@ -52,7 +52,7 @@ R= $V.0
all: $(PLAT)
$(PLATS) clean:
- cd src && $(MAKE) $@
+ cd src && $(MAKE) $@ V=$(V) R=$(R)
@dawidd6
dawidd6 / lua-5.4.patch
Created December 4, 2020 11:28
Homebrew on Linux
diff --git a/Makefile b/Makefile
index 36447a0..5f93891 100644
--- a/Makefile
+++ b/Makefile
@@ -52,7 +52,7 @@ R= $V.2
all: $(PLAT)
$(PLATS) help test clean:
- @cd src && $(MAKE) $@
+ @cd src && $(MAKE) $@ V=$(V) R=$(R)
-----BEGIN CERTIFICATE-----
MIIF+TCCA+GgAwIBAgIQRyDQ+oVGGn4XoWQCkYRjdDANBgkqhkiG9w0BAQwFADCB
iDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0pl
cnNleSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNV
BAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTQx
MDA2MDAwMDAwWhcNMjQxMDA1MjM1OTU5WjB2MQswCQYDVQQGEwJVUzELMAkGA1UE
CBMCTUkxEjAQBgNVBAcTCUFubiBBcmJvcjESMBAGA1UEChMJSW50ZXJuZXQyMREw
DwYDVQQLEwhJbkNvbW1vbjEfMB0GA1UEAxMWSW5Db21tb24gUlNBIFNlcnZlciBD
QTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJwb8bsvf2MYFVFRVA+e
xU5NEFj6MJsXKZDmMwysE1N8VJG06thum4ltuzM+j9INpun5uukNDBqeso7JcC7v
##
## Bundle of CA Root Certificates
##
## Certificate data from Mozilla as of: Wed Jan 1 04:12:10 2020 GMT
##
## This is a bundle of X.509 certificates of public Certificate Authorities
## (CA). These were automatically extracted from Mozilla's root certificates
## file (certdata.txt). This file can be found in the mozilla source tree:
## https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt
##
diff --git a/Make.inc/Makefile.inc.generic.SEQ b/Make.inc/Makefile.inc.generic.SEQ
index cf541f1..927ae1c 100644
--- a/Make.inc/Makefile.inc.generic.SEQ
+++ b/Make.inc/Makefile.inc.generic.SEQ
@@ -94,24 +94,21 @@ IORDERINGSC = $(IMETIS) $(IPORD) $(ISCOTCH)
PLAT =
# Library extension, + C and Fortran "-o" option
# may be different under Windows
-LIBEXT = .a
+LIBEXT = .so
==> Downloading https://github.com/tsl0922/ttyd/archive/1.5.2.tar.gz
Already downloaded: /home/linuxbrew/.cache/Homebrew/downloads/e412539941286e7dbfed4b3426710b1840005be6357d75d68c2dfb8c481db727--ttyd-1.5.2.tar.gz
==> Verifying e412539941286e7dbfed4b3426710b1840005be6357d75d68c2dfb8c481db727--ttyd-1.5.2.tar.gz checksum
tar xof /home/linuxbrew/.cache/Homebrew/downloads/e412539941286e7dbfed4b3426710b1840005be6357d75d68c2dfb8c481db727--ttyd-1.5.2.tar.gz -C /tmp/d20191124-18573-1v9lxh4
cp -pR /tmp/d20191124-18573-1v9lxh4/ttyd-1.5.2/. /tmp/ttyd-20191124-18573-1dnzlss/ttyd-1.5.2
==> cmake . -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG -DCMAKE_INSTALL_PREFIX=/home/linuxbrew/.linuxbrew/Cellar/ttyd/1.5.2_3 -DCMAKE_BUILD_TYPE=Release -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_VERBOSE_MAKEFILE=ON -Wno-dev -DOPENSSL_ROOT_DIR=/home/linuxbrew/.linuxbrew/opt/openssl@1.1
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /home/linuxb