Requirements: Systemd, Network Manager
-
Install required packages
apt install bluez bluez-tools iptables dnsmasq-base
-
Configure shared bridge interface
br0
#!/bin/bash | |
TEST_URL="http://www.gstatic.com/generate_204" | |
TRACE_IP="2607:f130:0:ee::1" | |
STATUS=0 | |
while true; do | |
result=$(curl -6 -sS -m 2 "$TEST_URL" 2>&1) | |
if [ $? -ne 0 ]; then | |
if [ $STATUS -eq 0 ]; then |
#!/bin/bash | |
# | |
# Requirement: jq curl | |
# Only support input not parameters | |
# | |
API_HOST=api.telegram.org | |
TOKEN=114514:abc123 | |
CHAT_ID=1919810 |
#!/bin/bash | |
prefix="*-" | |
shopt -s nullglob | |
rename(){ | |
local files=( $prefix* ) | |
for i in ${!files[*]} | |
do |
适用于系统盘为SSD数据盘有HDD的情况,实现开机自动解除HDD系统占用,每天4:00~4:30自动同步数据避免系统出错
#!/bin/sh
/share/Public/scripts/disk_standby.sh start
Public
中创建scripts
目录,向其中放入disk_standby.sh,添加执行权限chmod +x disk_standby.sh
//v4.35.0+ | |
{ | |
"inbounds": [ | |
{ | |
"port": 1090, //留给本机 socks 使用 | |
"listen": "127.0.0.1", | |
"protocol": "socks", | |
"settings": { | |
"auth": "noauth", | |
"udp": true |
proxies: | |
# shadowsocks | |
# The supported ciphers(encrypt methods): | |
# aes-128-gcm aes-192-gcm aes-256-gcm | |
# aes-128-cfb aes-192-cfb aes-256-cfb | |
# aes-128-ctr aes-192-ctr aes-256-ctr | |
# rc4-md5 chacha20-ietf xchacha20 | |
# chacha20-ietf-poly1305 xchacha20-ietf-poly1305 | |
- name: "ss1" | |
type: ss |
package main | |
import ( | |
"bytes" | |
"fmt" | |
"io" | |
"net/http" | |
"net/url" | |
"strings" | |
) |
#!/bin/bash | |
# sets envs for golang | |
if [ -z "$GOPATH" ]; then | |
export GOROOT="/usr/local/go" | |
export GOPATH="$HOME/go" | |
export PATH="$PATH:$GOPATH/bin:$GOROOT/bin" | |
fi |
func coin() { | |
backspace := "\b\b" | |
for i := 0; i < 5; i++ { | |
for _, c := range []string{"🌝", "🌖", "🌗", "🌘", "🌚", "🌒", "🌓", "🌔"} { | |
fmt.Printf("%s%s", backspace, c) | |
time.Sleep(33333 * time.Microsecond) | |
} | |
} | |
rand.Seed(int64(time.Now().UnixNano())) | |
if rand.Uint32() % 2 == 0 { |