This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import socket | |
| import struct | |
| import argparse | |
| from typing import Tuple, List | |
| class LocalResolver: | |
| """本地 DNS 解析器, 显式区分 IPv4 / IPv6""" | |
| @staticmethod |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import socket | |
| import struct | |
| import random | |
| import argparse | |
| from typing import List, Tuple | |
| class DnsQueryBuilder: | |
| """构造标准 DNS 查询报文""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # filename: start_thunder.sh | |
| # date: 2017-03-11 | |
| # author: nanpuyue <nanpuyue@gmail.com> https://blog.nanpuyue.com | |
| EXIT_TIME=$(( $(date +%s) + 15 )) | |
| exec "/opt/cxoffice/bin/wine" --bottle "迅雷极速版" --check --wait-children --start "C:/users/Public/Start Menu/Programs/迅雷软件/迅雷极速版/启动迅雷极速版.lnk" "$@" & |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # date: 2017-11-17 | |
| # license: GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt | |
| # author: nanpuyue <nanpuyue@gmail.com> https://blog.nanpuyue.com | |
| echo 'install: ~/.mozilla/native-messaging-hosts/hide_titlebar.json' | |
| [[ -d ~/.mozilla/native-messaging-hosts ]] || mkdir -p ~/.mozilla/native-messaging-hosts | |
| cat > ~/.mozilla/native-messaging-hosts/hide_titlebar.json << EOF | |
| { | |
| "name": "hide_titlebar", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # date: 2024-05-21 | |
| # license: GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt | |
| # author: nanpuyue <nanpuyue@gmail.com> https://blog.nanpuyue.com | |
| # 设置接口名称和流量限制 | |
| IFACE="eth0" | |
| LIMIT="190 GiB" | |
| # vnstat 数据库文件路径 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds | |
| index 37630cde66..f90ed13d12 100755 | |
| --- a/target/linux/ramips/base-files/etc/board.d/01_leds | |
| +++ b/target/linux/ramips/base-files/etc/board.d/01_leds | |
| @@ -205,6 +205,9 @@ hc5661a) | |
| ucidef_set_led_netdev "internet" "internet" "$boardname:blue:internet" "eth0.2" | |
| set_wifi_led "$boardname:blue:wlan2g" | |
| ;; | |
| +hc5611) | |
| + ucidef_set_led_default "system" "system" "$boardname:green:system" "1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // date: 2020-01-10 | |
| // update: 2024-04-01 | |
| // license: GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt | |
| // author: nanpuyue <nanpuyue@gmail.com> https://blog.nanpuyue.com | |
| #![feature(coroutines)] | |
| #![feature(coroutine_trait)] | |
| use std::ops::{Coroutine, CoroutineState}; | |
| use std::pin::Pin; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // date: 2020-01-10 | |
| // update: 2024-03-31 | |
| // license: GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt | |
| // author: nanpuyue <nanpuyue@gmail.com> https://blog.nanpuyue.com | |
| #![feature(coroutines)] | |
| #![feature(coroutine_trait)] | |
| use std::ops::{Coroutine, CoroutineState}; | |
| use std::pin::Pin; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # 南浦月 | |
| # nanpuyue@gmail.com | |
| # 2013-5-11 | |
| # 用法: | |
| # fonts-rename.sh <字体目录> | |
| # fonts-rename.sh <字体文件> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // date: 2023-06-12 | |
| // license: GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt | |
| // author: nanpuyue <nanpuyue@gmail.com> https://blog.nanpuyue.com | |
| // build: gcc -fPIC -shared -o hook_uname.so hook_uname.c -ldl | |
| // usage: LD_PRELOAD=./hook_uname.so uname -a | |
| #include <string.h> | |
| #include <dlfcn.h> | |
| #include <sys/utsname.h> |
NewerOlder