Skip to content

Instantly share code, notes, and snippets.

@1-1-2
1-1-2 / howto.txt
Last active September 2, 2023 03:09
My Makefiles
# load makefile
mkdir -p package/masscan
wget -nv https://gist.githubusercontent.com/1-1-2/4009f064cf994ecbe0b0cf87a2c15599/raw/masscan.tohash.Makefile -O package/masscan/Makefile
# load code and fix sha
make package/masscan/download V=s
make package/masscan/check FIXUP=1 V=s
grep -H PKG_MIRROR_HASH package/masscan/Makefile
# menuconfig
@1-1-2
1-1-2 / blazing-fast.sh
Last active August 5, 2023 13:42
OpenWrt List Installed Packages and Sort by Size
grep -H Installed-Size: /usr/lib/opkg/info/*.control | sed 's,^.*/\([^/]\+\)\.control:Installed-Size: *\(.*\),\2\t\1,' | sort -n
@1-1-2
1-1-2 / 926890.js
Last active March 26, 2023 03:47
ChatGPT heartbeat
// ==UserScript==
// @name ChatGPT heartbeat
// @namespace http://tampermonkey.net/
// @version 0.2
// @description try to take over the world!
// @author https://v2ex.com/t/926890
// @match https://chat.openai.com/chat*
// @icon https://chat.openai.com/favicon.ico
// @grant none
// ==/UserScript==
@1-1-2
1-1-2 / lean's lede
Last active August 17, 2023 15:40
depends-ubuntu-22.04
ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pyelftools libpython3-dev qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev python3-setuptools
@1-1-2
1-1-2 / 02_network.re-cp-02.patch
Last active April 12, 2025 11:12
Experimental patches for JDCloud Router(s)
--- ./openwrt/target/linux/ramips/mt7621/base-files/etc/board.d/02_network 2023-12-15 22:05:46.668367604 +0800
+++ ./patch_test/02_network 2023-12-31 16:57:11.667111818 +0800
@@ -23,6 +23,7 @@
xiaomi,mi-router-3-pro|\
xiaomi,mi-router-ac2100|\
xiaomi,mi-router-cr6606|\
+ jdcloud,re-cp-02|\
xiaomi,mi-router-cr6608|\
xiaomi,mi-router-cr6609|\
xiaomi,redmi-router-ac2100|\