<-
摘要: 这里有些服务要用: 1. app 的安装位置 2. app要添加到环境变量path里面 3. app 要添加服务,需要在systemd/system/下面添加app的service sudo nano /etc/systemd/system/myapp.service [Unit] Descript 阅读全文
posted @ 2026-04-06 09:00 calochCN 阅读(1) 评论(0) 推荐(0)
摘要: https://www.php.cn/faq/1901122.html 这里打算用docker, 准备两个mysql, 第一个使用, 我需要使用两个docker的mysql镜像,5.7或者8.0的,这两个镜像,最新的也许好一些。然后将这些镜像备份到本地以备load使用 MySQL主从同步需主库启用b 阅读全文
posted @ 2026-04-06 08:52 calochCN 阅读(0) 评论(0) 推荐(0)
摘要: my rectwin app enhanced: #include <windows.h> #include <shellapi.h> // For Shell_NotifyIcon functions #include <stdio.h> // building the app: // gcc h 阅读全文
posted @ 2026-04-04 12:39 calochCN 阅读(9) 评论(0) 推荐(0)
摘要: Now in browser, to use comman js module style: 1. i1.html <!doctype html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" conte 阅读全文
posted @ 2026-01-25 09:39 calochCN 阅读(2) 评论(0) 推荐(0)
摘要: Log management is one of those essential sysadmin tasks that can make or break your server’s performance and disk space. Without proper log rotation, 阅读全文
posted @ 2025-12-28 21:51 calochCN 阅读(6) 评论(0) 推荐(0)
摘要: GOLANG 深拷贝: package main import ( "fmt" "reflect" ) func DeepCopy(src interface{}) interface{} { if src == nil { return nil } srcVal := reflect.ValueO 阅读全文
posted @ 2025-10-06 17:58 calochCN 阅读(17) 评论(0) 推荐(0)
摘要: go, get net/http connection count var activeConnections int32 func handler(w http.ResponseWriter, r *http.Request) { atomic.AddInt32(&activeConnection 阅读全文
posted @ 2025-10-06 17:34 calochCN 阅读(9) 评论(0) 推荐(0)
摘要: 手动数据库分片 // 手动分片逻辑示例 func getShardDB(userID int) *gorm.DB { dbIndex := userID % 4 dsn := fmt.Sprintf("user:pwd@tcp(db-%d:3306)/user_db_%d", dbIndex, db 阅读全文
posted @ 2025-10-06 17:22 calochCN 阅读(8) 评论(0) 推荐(0)
摘要: 需要安装 sudo apt install mdadm, 是 mange disk admin这个工具 通过blkid /dev/md126p7 查看设备的uuid, 使用 lsblk 可以查看所有硬盘 和内部分区, 记得分区名, 按大小,找到需要挂载的分区, 一般是 ls /dev/md*, 查看 阅读全文
posted @ 2025-05-29 15:43 calochCN 阅读(240) 评论(0) 推荐(0)
摘要: <ul class="horizental"><li>4<ul><li>2</li><li>5<ul><li>6</li><li>7</li></ul></li><li>2</li><li>2</li></ul></li><li><span>3</span></li><li>1</li 阅读全文
posted @ 2025-01-14 23:12 calochCN 阅读(30) 评论(0) 推荐(0)