常用Github开源项目推荐

BBDown

一款命令行式哔哩哔哩下载器. Bilibili Downloader.
https://github.com/nilaoda/BBDown

iOS日历增强——中国节假日补班日历

中国节假日补班日历
https://github.com/lanceliao/china-holiday-calender

CPU单核跑分天梯图

本图收集了常见CPU型号单核跑分图,包括英特尔 酷睿(Intel Core)桌面处理器系列, 英特尔 酷睿(Intel Core)移动处理器系列和AMD 锐龙(Ryzen)处理器系列。
https://github.com/mediv01/CPU-Single-Core-Benchmark

Homebrew国内快速安装

https://github.com/ineo6/homebrew-install

Ubuntu / CentOS 磁盘根目录在线扩容 & 修改分区 inode 数量

Ubuntu 作为服务器系统使用的时候,系统盘的空间可能并不是很充裕,apt apt 着,根目录就满了。诚然,增加磁盘 / 分区并挂载是一个方案,但并不能解决所有问题(例如 apt)。同时,一些跑在云平台上的服务器并没有很好的离线操作磁盘的手段,这时候在线扩容就显得极为必要了。

数据无价!对磁盘进行任何操作前,请务必做好备份!

0. 简要操作步骤

#系统分区扩容
parted -l
fdisk -l
cfdisk

#扩容块(sda3)
lsblk
pvresize /dev/sda3
lsblk

#扩容lv和vg(Ubuntu)
lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
df -h

#扩容lv和vg(CentOS)
lvextend -l +100%FREE /dev/mapper/centos-root
resize2fs /dev/mapper/centos-root
df -h

1. 磁盘根目录在线扩容

操作环境:Proxmox VE 虚拟化 / Ubuntu 22.04.5 LTS / GPT 分区表 / ext4 分区

PVE对特定容器定时重启

背景

  • 由于观测到HomeAssistant这台VM的内存占用总是随着时间的推移而增加,然后最终会OOM,且无论升级了多少个版本也是如此,推测HomeAssistant有内存泄漏问题

解决方案

  • 在虚拟机层面,对该VM进行定期重启(每天一次)
  • 登录到PVE所在的服务器
  • 执行crontab -e,并输入下面命令
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin

0 12 * * * qm stop 2007 ; sleep 10 ; qm start 2007
  • 注:命令中的2007是vmid,即VM的全局唯一ID

【转】iptables持久化方案

debian若没有安装iptables,使用以下命令安装

apt-get install iptables

清除已有规则

iptables -F;iptables -X;iptables -Z

开放端口

允许本地回环接口(即运行本机访问本机) && 允许已建立的或相关连的通行

iptables -A INPUT -i lo -j ACCEPT;iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

WOW TrinityCore 安装教程(基于10.0.2.47657)

WOW TrinityCore 安装教程

相关参考资料

  • https://github.com/TrinityCore/TrinityCore
  • https://trinitycore.info/en/home
  • https://trinitycore.info/install/requirements/linux
  • https://trinitycore.info/install/Core-Installation/linux-core-installation
  • https://trinitycore.info/en/install/Server-Setup
  • https://trinitycore.info/en/install/Final-Server-Steps

修复 Spring 2.3.x 升级到更新版本出现的跨域问题

异常提示:

When allowCredentials is true, allowedOrigins cannot contain the special value "*" since that cannot be set on the "Access-Control-Allow-Origin" response header. To allow credentials to a set of origins, list them explicitly or consider using "allowedOriginPatterns" instead.

#解决办法:
跨域配置报错,将.allowedOrigins替换成.allowedOriginPatterns即可。

修复 SpringFox 3.0.0 不兼容 SpringBoot 2.6.4 的问题

异常提示:

Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException

原因分析:

SpringFox 3.0.0 不兼容 SpringBoot 2.6.4

解决方案: