Skip to content

Instantly share code, notes, and snippets.

View Potat0000's full-sized avatar
😃

Potat0 Potat0000

😃
View GitHub Profile
@Potat0000
Potat0000 / PVE_Manager_Modifier.sh
Last active February 4, 2024 05:33
A script to modify pve-manager
#!/usr/bin/env bash
# shellcheck disable=SC2016
# 脚本功能:
# 1. 修改 LXC 源为清华源
# 2. 在面板中显示 CPU 温度和频率
# 3. 去除数据中心概要和节点概要中的订阅状态显示
# 4. 去除无订阅弹窗
# 适配版本:
# 在 PVE 7.4、8.0、8.1 上测试通过
@Potat0000
Potat0000 / chnroute2.diff.rsc
Last active June 24, 2024 18:28
CHNRoute2 For RouterOS 7
# 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={}
@Potat0000
Potat0000 / ipplus360.py
Last active May 11, 2024 06:21
AIWEN Tech IPv4 Geo-Info API Script
#!/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: #
@Potat0000
Potat0000 / WireGuard_Port_Change_Linux.py
Last active January 23, 2023 06:25
WireGuard Port Change
#!/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:
@Potat0000
Potat0000 / auto-virtualenv
Created July 17, 2019 00:45
Auto activate and deactivate a virtualenv environment
#!/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
# ```