ssh command, openssh

ssh command, openssh 端口转发 ssh 不登陆直接执行命令 openssh 9.0 sftp-server options, 参数 -T: 禁止分配伪终端, Disable pseudo-terminal allocation -t 或 -tt: 强制分配伪终端, Force pseudo-terminal allocation. This can be used to execute arbitrary screen-based programs on a remote machine, which can be very useful, e.g. when implementing

calibre, 电子书管理, calibre-web

calibre, 电子书管理 calibre-web k8s calibre-dp.yaml 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 apiVersion:apps/v1kind:Deploymentmetadata:name:calibre-webnamespace:defaultspec:replicas:1selector:matchLabels:name:calibre-webtemplate:metadata:labels:name:calibre-webspec:containers:- name:calibre-web-containerimage:lscr.io/linuxserver/calibre-web:0.6.18imagePullPolicy:IfNotPresentenv:- name:PUIDvalue:"1000"- name:PGIDvalue:"1000"- name:TZvalue:"Asia/China"- name:DOCKER_MODSvalue:"linuxserver/calibre-web:calibre"-

lsof command

lsof command lsof means ‘List Open Files’ List all open files on the system or open files for specified PID 查看一个进程打开了哪些文件 1 2 3 4 5 #PID: 1098 sudo lsof -p 1098 ## 查看进程打开了哪些端口 # 以上命令返回的数据里 有 TCP 字

docker registry

docker registry install registry 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 # sample, https://docs.docker.com/registry/configuration/ cat > /usr/local/etc/docker-registry-config.yml << EOF version: 0.1 log: fields: service: registry storage: delete: enabled: true

kde config

kde config 快捷键 功能 key krunner alt+space 快捷键设置 System Settings>shortcuts 多显示器 任务栏 https://superuser.com/questions/905591/kde-taskbar-task-manager-only-on-vga-screen-not-dvi-screen/906725 Right-click on the panel -> Panel Settings then drag the Screen Edge bar to the bottom of the screen to move the panel. Then right click on the panel -> Add Widgets -> Double-click on Task Manager. Then right-click somewhere near the middle of the

compact/extract 压缩/解压

compact/extract 压缩/解压 .tar.gz 和 .tgz .tgz 和 .tar.gz 是同一个东西, .tgz 可以认为是 .tar.gz 是简写, 在远古时代比如 DOS 系统, 文件扩展名只能是三个字符, 所以有了 .tgz, 后来限制解除之后就能支

正则表达式, regex

正则表达式, regex 1 2 3 4 # PCRE # 10.0.0.0/8; 172.0.0.0/12; 192.168.0.0/16 ^[\d|\.|\/|;| ]+$ 元字符 描述 将下一个字符标记为一个特殊字符, 或一个原义字符, 或一个向后引用, 或一个八进制转义符。例如,&

PVE

PVE macos 1 2 3 4 5 6 7 8 hdiutil convert proxmox-ve_8.3-1.iso -format UDRW -o proxmox-ve_8.3-1.dmg diskutil list # insert the USB flash drive diskutil list diskutil unmountDisk /dev/diskX # rdiskX, instead of diskX, in the last command is intended. It will increase the write speed. sudo dd if=proxmox-ve_8.3-1.dmg bs=1M of=/dev/rdisk5 创建安装盘 U盘 wiloon.com/ventoy 1 dd bs=1M conv=fdatasync if=./proxmox-ve_*.iso of=/dev/XYZ 去除 Proxmox 企

VirtualBox

VirtualBox 显存 使用 4k 显示器的时候如果 virtualbox 显存设置的太小, 会导致黑屏. 剪贴板共享 Settings> General> Advanced> Shared Clipboard: Bidirectional NAT 端口转发 虚拟机> 设置> 网络> 网卡1>

Archlinux 安装 linux-lts 内核

Archlinux 安装 linux-lts 内核 Archlinux 如果做服务器用的话, 最好安装 LTS 内核, 否则…说不定哪次更新之后, 服务就起不来了, 比如最近遇到的 linux 5.19.1 和 netavark 的兼容问题.

git reset

git reset git reset 是一个重置 (reset) 命令, 通过 git reset 命令可以修改 HEAD 指向不同的提交,这个提交甚至都不必是当前分支上的某次提交, 只要是版本库中合法提交都可以使用这

openwrt basic, opkg basic, ipk

openwrt basic, opkg basic, ipk commands 1 2 3 4 5 # 查看 openwrt 版本 cat /etc/openwrt_release # 更新所有软件,包括 OpenWRT 内核、固件等 opkg list-upgradable | cut -f 1 -d ' ' | xargs opkg upgrade wan dns 在 wan 口设置里的“高级设置”选项里去掉&

resolv.conf, systemd-resolved, DNS

resolv.conf, systemd-resolved, DNS 1 2 3 4 5 6 7 8 9 10 11 12 13 # 查看版本 systemd-resolve --version # check systemd-resolved status resolvectl status resolvectl restart # disable dns on 53 port vim /etc/systemd/resolved.conf # switch off binding to port 53 DNSStubListener=no # disable LLMNR LLMNR=false https://cloud-atlas.readthedocs.io/zh_CN/latest/linux/redhat_linux/systemd/systemd_resolved.html 测试 域名解析 1 2 3 resolvectl query goproxy.cn resolvectl query baidu.com resolvectl query google.com

xfce

xfce disable taskbar items grouping Right click on the taskbar, select Panel -> Panel Preferences Select the Items tab , select Window Buttons in the list, click the Edit button on the right side Change Window grouping to Never xfce 快捷键 1 ctrl+F1 #切换工作区 列出已经配置的快捷键 1 xfconf-query -c xfce4-keyboard-shortcuts -l -v|grep thunar 修改

fcitx

fcitx https://wiki.archlinux.org/title/Fcitx5 archlinux KDE 安装 fcitx https://blog.csdn.net/GaaraZ/article/details/128618441 https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland#KDE_Plasma 1 2 3 4 5 6 7 8 9 10 11 12 # include 1) fcitx5 2) fcitx5-configtool 3) fcitx5-gtk 4) fcitx5-qt sudo pacman -S fcitx5-im sudo pacman -S fcitx5-chinese-addons # disable fcitx5 desktop file after install fcitx5 in kde sudo mv /etc/xdg/autostart/org.fcitx.Fcitx5.desktop/org.fcitx.Fcitx5.desktop /etc/xdg/autostart/org.fcitx.Fcitx5.desktop/org.fcitx.Fcitx5.desktop.bak #--- sudo pacman -S fcitx-table-extra # kcm-fcitx5 包的实际内容是 fcitx5-configtool # fcitx-table-extra:

DataGrip

DataGrip console 中使用变量 1 2 3 4 select * from public.actor where actor.actor_id < ${a} 导出建表语句 打开DataGrip、找到目标表 选中之后右键点击SQL Scripts→SQL Generator. 就可以看到建

android 自动充电

android 自动充电 Chanify 消息推送工具 https://github.com/chanify/chanify-ios/blob/main/README-zh_CN.md 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 # sample podman run -it \ -v /my/data:/root/.chanify \ wizjin/chanify:latest \ serve --name=<node name> --endpoint=http://<address>:<port> # podman podman run -it \ -d --name chanify \ -p 30080:80 \ -v chanify-data:/root/.chanify \ wizjin/chanify:latest \ serve --name=chanify0

ssh-agent, ssh agent, ssh forward

ssh-agent, ssh agent, ssh forward ssh agent forward A > B > C 主机 A:运行 ssh-agent,并且已经加载私钥 主机 B:跳板机 主机 C: 目标机,已经配置好公钥,并且运行 sshd 检查主机 A ssh-agent

bitwarden

bitwarden auto fill Chrome extension> bitwarden> settings> option> autofill> enable auto-fill on page load podman server https://hub.docker.com/r/vaultwarden/server 1 2 3 4 5 # docker pull vaultwarden/server:1.33.2-alpine podman pull vaultwarden/server:1.33.2-alpine podman run -d --name bitwarden -v bitwarden-data:/data/ -p 8000:80 docker.io/vaultwarden/server:latest docker run -d --name bitwarden --restart=always -v bitwarden-data:/data/ -p 8000:80 vaultwarden/server:1.28.1-alpine 测试一下,直接用浏览器访问 80 端口应该能看

epub pdf azw3 mobi

“epub pdf azw3 mobi” EPUB> PDF> azw3 Calibre 从 azw3 转换格式到 EPUB 只需要 1分半, 转 PDF 格式需要10分钟以上。 azw3 > EPUB https://divineengine.net/article/how-to-remove-drm-from-kindle-books-with-calibre/ mobi mobi 电子书格式能够流行普及起来,很大程度上依靠亚马逊这个巨大