Uptime Kuma的部署与简单使用
Uptime Kuma 是一款开源自托管的轻量级监控工具
功能特性:
监控类型:支持监控 HTTP(s) / TCP / HTTP(s) 关键字 / HTTP(s) Json 查询 / Ping / DNS 记录 / Push / Steam 游戏服务器 / Docker 容器 / 数据库(SQL Server、PostgreSQL、MySQL、MongoDB、Redis 等)
通知类型:支持 Telegram / Discord / Gotify / Slack / Pushover / Email / Webhook 等 90 多种通知方式
检测间隔:支持最低 20 秒的检测间隔
图表:支持以图表形式查看历史数据
开始部署
一、安装Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
最后我们在docker容器中运行下 hello world 看一下是否安装成功。
sudo docker container run hello-world
可以看到出现hello world,说明已经安装成功
Quickbox-lite安装qbittorrent后用户列表不显示国旗的解决方法
OS:Ubuntu 24.04.2 LTS
Quickbox-lite:v1.5.11
qBittorrent:v4.6.7
1、下载db-ip Country Lite数据库并将数据库文件重命名为dbip-country-lite.mmdb
2、将数据库文件放到/home/username/.local/share/qBittorrent/GeoDB/
目录下
3、在Quickbox-lite仪表盘中重启qbittorrent服务
PHP生成随机密码
使用PHP生成16位随机密码,要求必需同时包含大写字母、小写字母、数字、特殊符号,且第一位必需大写
<?php
function generatePassword() {
// 定义字符集
$uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
$lowercase = 'abcdefghijklmnopqrstuvwxyz';
$numbers = '0123456789';
$specialChars = '!@#$%^&*()_+-=[]{}|;:,.<>?';
// 确保每种字符至少出现一次
$password = $uppercase[random_int(0, strlen($uppercase) - 1)]; // 第一位是大写字母
$password .= $lowercase[random_int(0, strlen($lowercase) - 1)]; // 第二位是小写字母
$password .= $numbers[random_int(0, strlen($numbers) - 1)]; // 第三位是数字
$password .= $specialChars[random_int(0, strlen($specialChars) - 1)]; // 第四位是特殊符号
// 剩余的12位随机字符
$allChars = $uppercase . $lowercase . $numbers . $specialChars;
for ($i = 4; $i < 16; $i++) {
$password .= $allChars[random_int(0, strlen($allChars) - 1)];
}
// 将密码转换为数组,方便操作
$passwordArray = str_split($password);
// 打乱除第一位之外的字符
$shuffledPart = array_slice($passwordArray, 1);
shuffle($shuffledPart);
// 重新组合密码,确保第一位是大写字母
$password = $passwordArray[0] . implode('', $shuffledPart);
return $password;
}
// 生成并输出密码
echo generatePassword();
?>
SeaCMS静态模式跳转页码功能
版本:V13.2
静态模式: 目录2:/{dir}/{page}id
编辑/js/function.js
文件第171行,找到
goUrl=(url.split('_').length<3)?regexpSplice(url,/(\/\/\S+\d+?)(\.html|\.htm|\.shtml|\.shtm|\.asp|\.php)/,str):regexpSplice(url,/(\/\/\S+\d+?)_\d+(\.html|\.htm|\.shtml|\.shtm|\.asp)/,str);
修改为
goUrl=(url.split('_').length<2)?regexpSplice(url,/(\/\/\S+\d+?)(\.html|\.htm|\.shtml|\.shtm|\.asp|\.php)/,str):regexpSplice(url,/(\/\/\S+\d+?)_\d+(\.html|\.htm|\.shtml|\.shtm|\.asp)/,str);