Margrop
Articles158
Tags353
Categories21
1password AC AP API AppDaemon Aqara Cron Date Diagrams.net HA HADashboard HomeAssistant IP IPv4 Java LVM‑Thin Linux MacOS MySQL NAS PPPoE PostgreSQL ProcessOn Proxmox VE SSL Shell TTS TimeMachine UML Uptime Kuma Web Windows activate ad adb adblock agent aligenie aliyun alpine annotation aop authy autofs backup baidupan bash bitwarden boot brew browser caddy2 cdn centos cert certbot charles chat chrome classloader client clone closures cloudflare cmd command commit container crontab ctyun ddsm demo dependency deploy developer devtools dll dns docker domain download draw drawio dsm dump dylib edge exception export fail2ban feign firewall-cmd flow frp frpc frps fuckgfw function gcc gfw git github golang gperftools gridea grub gvt-g hacs havcs heap hello hexo hibernate hidpi hoisting homeassistant hosts html htmlparser https idea image img img2kvm import index install intel io ios ip iptables iptv ipv6 iso java javascript jetbrains jni jnilib jpa js json jsonb jupter jupyterlab jvm k8s kernel key kid kms kodi koolproxy koolproxyr kvm lan lastpass launchctl learning lede letsencrypt linux live low-code lvm lxc m3u8 mac macos mariadb markdown maven md5 microcode mirror modem modules monitor mount mstsc mysql n2n n5105 nas network nfs node node-red nodejs nohup notepad++ npm nssm ntp oop openfeign openssl os otp ovz packet capture pat pdf pem perf ping pip plugin png powerbutton print pro proxy pve pvekclean python qcow2 qemu qemu-guest-agent rar reboot reflog remote remote desktop renew repo resize retina root route router rule rules runtime safari sata scipy-notebook scoping scp server slmgr so socks source spk spring springboot springfox ssh ssl stash string supernode svg svn swagger sync synology systemctl tap tap-windows tapwindows telecom template terminal tls token totp tvbox txt ubuntu udisk ui undertow uninstall unlocker upgrade url v2ray vhd vim vlmcsd vm vmdk web websocket wechat windows with worker wow xiaoya xml yum zip 中国电信 云电脑 交换机 光猫 公网IP 内存 内网IP 升级 启动 夏令时 天猫精灵 天翼云 安装 容器 导入 小米 常用软件 广告屏蔽 序列号 应用市场 异常 抓包 描述文件 时区 显卡虚拟化 智能家居 智能音箱 梯子 模块 流程 流程图 浏览器 漫游 激活 火绒 电信 画图 直播源 续期 网关 网络风暴 群晖 腾讯 虚拟机 证书 路由 路由器 软件管家 软路由 运维监控 镜像 镜像源 门窗传感器 防火墙 阿里云 阿里源 集客

Hitokoto

Archive

ProxmoxVE 7.4升级到8.0,详细步骤

ProxmoxVE 7.4升级到8.0,详细步骤

第一步:详细阅读官方文档

https://pve.proxmox.com/wiki/Upgrade_from_7_to_8

注意:
如果远程使用ssh连接的话,建议先使用screen命令,避免网络不稳定,操作中断导致的各种问题

第二步:升级到最新的 7.4 版本

1
2
3
4
5
6
7
8
apt update -y && apt dist-upgrade -y

sed -i_orig "s/data.status === 'Active'/true/g" /usr/share/pve-manager/js/pvemanagerlib.js
sed -i_orig "s/if (res === null || res === undefined || \!res || res/if(/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
sed -i_orig "s/.data.status.toLowerCase() !== 'active'/false/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
systemctl restart pveproxy

pveversion

最新的版本是 7.4.15

TVBOX 长期维护apk下载地址和接口

TVBOX 长期维护apk下载地址和接口

电视盒子TVBox takagen99版,v20230307_2315 (附最新接口地址)

电视盒子TVBox takagen99版,v20230307_2315 (附最新接口地址)

开源,免费,自行配置接口,直播、点播两用,安卓设备。

takagen99版拥有全新UI外观、功能更加丰富,支持挂载WebDav和本地盘,播放器显示分辨率、网速、时间屏显等功能。
二、TVbox使用教程
首页点击“设置”,选择“配置地址”,输入”数据源地址“,开启存储权限,“确定”后选择数据源,然后就可以使用了。

使用ffmpeg批量删除音视频的片头片尾

使用ffmpeg批量删除音视频的片头片尾

步骤

1. 下载ffmpeg

  • 步骤略

2. 编辑Bat脚本

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
@echo off & setlocal enabledelayedexpansion

rem ===================需手动设置===================
rem 设定片头片尾长度,格式为 HH:mm:ss.fff
set "s1=00:01:07.0"
set "s2=00:01:30.0"
rem ================================================

for /f "tokens=1-4delims=:." %%a in ("%s2%") do (
set /a "t2=(1%%a %% 100 *3600 + 1%%b %% 100 * 60 + 1%%c %% 100) * 1000 + 1%%d %% 1000"
)

md myvideo 2>nul
for %%i in (*.avi *.mkv *.mp4 *.flv) do (
for /f "tokens=2-5delims=:., " %%a in ('ffmpeg -i "%%i" 2^>^&1 ^| find "Duration:"') do (
set /a "t=(1%%a%%100*3600+1%%b%%100*60+1%%c%%100)*1000+1%%d0%%1000,t-=t2,ms=t%%1000,t/=1000"
set /a h=t/3600,m=t%%3600/60,s=t%%60,h+=100,m+=100,s+=100,ms+=1000
set "t=!h:~1!:!m:~1!:!s:~1!.!ms:~1!"
ffmpeg -ss !s1! -to !t! -accurate_seek -i "%%i" -c copy -avoid_negative_ts 1 "myvideo\%%i" -y
)
)
pause
gitlab-ci-yml配置说明(官方文档翻译)

gitlab-ci-yml配置说明(官方文档翻译)

重要的内置变量

CI_COMMIT_REF_NAME: The branch or tag name for which project is built.
CI_CONFIG_PATH: The path to the CI/CD configuration file. Defaults to .gitlab-ci.yml. Read-only inside a running pipeline.
CI_PROJECT_PATH: The project namespace with the project name included.
CI_BUILDS_DIR: The top-level directory where builds are executed.
CI_PROJECT_DIR: The full path the repository is cloned to, and where the job runs from. If the GitLab Runner builds_dir parameter is set, this variable is set relative to the value of builds_dir. For more information, see the Advanced GitLab Runner configuration.

logback 自定义添加 logstash 字段

logback 自定义添加 logstash 字段

步骤

如果想在输出的JSON中,加上自定义字段,需要配置arguments参数

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<encoder class="net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder">
<providers>
<pattern>
<pattern>
{
"timestamp": "%date{\"yyyy-MM-dd HH:mm:ss\"}",
"log_level": "%level",
"class_name": "%class",
"thread": "%thread",
"message": "%message",
"stack_trace": "%exception{5}"
}
</pattern>
</pattern>
<arguments/>
</providers>
</encoder>
Mysql online DDL 线上无锁添加索引

Mysql online DDL 线上无锁添加索引

步骤

只能通过ALTER TABLE不能create index

1
ALTER TABLE tbl_name ADD INDEX (column), ALGORITHM=INPLACE, LOCK=NONE;
常用Github开源项目推荐

常用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

使用 v2ray 配置内网访问——基于公网IP

使用 v2ray 配置内网访问——基于公网IP

前提条件:

  • 有公网IP

需求

  • 需要进行安全的内网访问
  • 需要加密流量
  • 支持 TCP / UDP
Ubuntu / CentOS 磁盘根目录在线扩容 & 修改分区 inode 数量

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

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

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

0. 简要操作步骤

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#系统分区扩容
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 分区