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
| #!/usr/bin/env -S uv run --script | |
| # /// script | |
| # requires-python = ">=3.11" | |
| # dependencies = ["printable>=0.5.0", "dnspython>=2.8.0"] | |
| # /// | |
| import argparse | |
| import ctypes | |
| import functools | |
| import ipaddress |
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
| --- | |
| mode: rule | |
| log-level: info | |
| # 是否允许内核接受 IPv6 流量 | |
| # 与 dns.ipv6 是「与」关系,两者都开才会返回 AAAA | |
| ipv6: true | |
| # https://wiki.metacubex.one/config/dns/ | |
| # https://wiki.metacubex.one/config/dns/diagram/ | |
| # |
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
| #!/usr/bin/env -S uv run --script | |
| # /// script | |
| # requires-python = ">=3.10" | |
| # dependencies = [] | |
| # /// | |
| """ZTE CPE(G5TS Pro / MC8500)命令行控制台,基于 ubus JSON-RPC。 | |
| 用法: | |
| zte-cpe status # 概览:设备 + SIM + 网络 + 信号 + 流量 | |
| zte-cpe signal --json # 信号质量,输出 JSON 供程序/AI 消费 |
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
| #!/usr/bin/env -S uv run --script | |
| # /// script | |
| # requires-python = ">=3.11" | |
| # dependencies = [] | |
| # /// | |
| """解析 Codex 或 Claude 会话历史。""" | |
| import argparse | |
| import json |
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
| #!/usr/bin/env python3 | |
| # created at 2024.10.05 | |
| import argparse | |
| from decimal import Decimal as D | |
| from data_process.io_csv import read_csv, write_csv # python3 -m pip install data-process | |
| def cal_distance(lat1, lon1, lat2, lon2): | |
| """ | |
| Calculate the great circle distance between two points |
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
| // ==UserScript== | |
| // @name Shotcuts | |
| // @namespace http://bitflow.org | |
| // @version 0.1 | |
| // @description add shotcuts | |
| // @match https://*/* | |
| // @copyright 2022+, You | |
| // ==/UserScript== | |
| function onKey(e) { | |
| // console.log(e, e.key); |
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
| --- | |
| # --------------------------------------------------- | |
| # 语法 https://github.com/Dreamacro/clash/wiki/configuration | |
| # 配置文件需要放置在 $HOME/.config/clash/config.yml | |
| # 如果您不知道如何操作,请参阅 https://github.com/Hackl0us/SS-Rule-Snippet/wiki/clash(X) | |
| # 由于 ClashCore 1.0 的发布,ClashX 1.30.x 的版本包括不向前兼容的更新。如果您的配置文件尚未兼容新的配置文件格式,请谨慎更新。 | |
| # 查看详细内容:https://github.com/Dreamacro/clash/wiki/breaking-changes-in-1.0.0 | |
| # --------------------------------------------------- |
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
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| func one(n int64) { | |
| ids := []int64{} | |
| for i := int64(1); i <= n; i++ { | |
| ids = append(ids, i) |
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
| #!/usr/local/bin/python | |
| import json | |
| import datetime | |
| from urllib.request import urlopen | |
| INSTANCES = [ | |
| { | |
| # Your private key for accessing gitlab: User -> Settings -> Access tokens -> add personal access token with api scope |
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
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "strings" | |
| ) | |
| const DASH = "-" |
NewerOlder