This file contains 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 bash | |
# shellcheck disable=SC2016 | |
# 脚本功能: | |
# 1. 修改 LXC 源为清华源 | |
# 2. 在面板中显示 CPU 温度和频率 | |
# 3. 去除数据中心概要和节点概要中的订阅状态显示 | |
# 4. 去除无订阅弹窗 | |
# 适配版本: | |
# 在 PVE 7.4、8.0、8.1 上测试通过 |
This file contains 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
# Tue, 25 Jun 2024 02:28:20 +0800 | |
do { /ip/firewall/address-list/remove [find list=chnroute2 address=110.41.0.0/17] } on-error={} | |
do { /ip/firewall/address-list/remove [find list=chnroute2 address=110.41.128.0/18] } on-error={} | |
do { /ip/firewall/address-list/remove [find list=chnroute2 address=110.41.192.0/20] } on-error={} | |
do { /ip/firewall/address-list/remove [find list=chnroute2 address=110.41.208.0/23] } on-error={} | |
do { /ip/firewall/address-list/remove [find list=chnroute2 address=110.41.211.0/24] } on-error={} | |
do { /ip/firewall/address-list/remove [find list=chnroute2 address=110.41.212.0/22] } on-error={} | |
do { /ip/firewall/address-list/remove [find list=chnroute2 address=110.41.216.0/21] } on-error={} | |
do { /ip/firewall/address-list/remove [find list=chnroute2 address=110.41.224.0/19] } on-error={} | |
do { /ip/firewall/address-list/add list=chnroute2 address=110.41.0.0/16 } on-error={} |
This file contains 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 | |
############################################################################### | |
# AIWEN Tech IPv4 Geo-Info API Script # | |
# Only Support District-Level Query # | |
############################################################################### | |
# Requires Python 3.7+ due to the requirements of dnspython. # | |
# Tested on Debian 12. # | |
# # | |
# Use -h or --help option to get instructions. # | |
# Run the following command to install dependencies: # |
This file contains 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 | |
# coding=utf-8 | |
import shlex | |
import subprocess | |
IFACE_LIST = ['wg_port1', 'wg_port2', 'wg_port3'] | |
def simple_run(command, timeout=3): | |
try: |
This file contains 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 zsh | |
# | |
# Auto activate and deactivate a virtualenv environment | |
# | |
# Usage: | |
# | |
# Add the following code to your zshrc file. If you are using bash, change the header to bash and put the following code to your bashrc. | |
# ``` | |
# source /dir/to/auto-virtualenv | |
# ``` |