Skip to content

Instantly share code, notes, and snippets.

View Ansen's full-sized avatar
🐶
Working all day

An Ansen

🐶
Working all day
View GitHub Profile
#!/bin/bash
# Author: An Shen
# Date: 2023-01-30
. /etc/profile
function log(){
echo "[$(date +'%Y-%m-%d %H:%M:%S')] - $1"
}
@Ansen
Ansen / network-check.sh
Last active November 22, 2024 11:51
Automatically restart the device when the network is unavailabled
#!/bin/bash
. /etc/profile > /dev/null 2>&1
# PUB_DNS='1.1.1.1'
# CHINA ONLY
PUB_DNS='223.5.5.5'
# percentage
REBOOT_THRESHOLD=80
@Ansen
Ansen / gist:bb1a87e6fee80d11472eb79a565b6155
Created January 9, 2025 09:32
Huorong Security Log about BingWallpaperApp
【1】2025-01-09 17:17:10,系统防护,自定义防护,BingWallpaperApp.exe触犯自定义防护规则, 已阻止
触犯规则:隐私-edge浏览器[防被读取]
操作类型:【读取】
操作文件:C:\Users\xxxx\AppData\Local\Microsoft\Edge\User Data\Default\History
操作结果:已阻止
进程ID:2784
操作进程:C:\Users\xxxx\AppData\Local\Microsoft\BingWallpaperApp\BingWallpaperApp.exe
操作进程命令行:"C:\Users\xxxx\AppData\Local\Microsoft\BingWallpaperApp\BingWallpaperApp.exe"
@Ansen
Ansen / check_zerotier.sh
Last active March 26, 2025 10:31
check_zerotier.sh
#!/bin/sh
# 默认参数
DEFAULT_IP="10.0.0.1"
DEFAULT_COUNT=3
DEFAULT_TIMEOUT=2
DEFAULT_INTERFACE="ztukuvylmh"
INTERVAL=60
# 函数:检查 IP 格式