磁盘性能测试

磁盘性能测试 https://blog.csdn.net/zqtsx/article/details/25487185 linux 下测试磁盘的读写 IO 速度 (IO物理测速) hdparm 这是一个是用来获取 ATA/IDE 硬盘的参数的命令, 是由早期 Linux IDE 驱动的开发和维护人员 Mark Lord 开发编写的 (hdparm has been written by Mark Lord, the primary developer and maintainer of the (E)IDE driver for Linux, with suggestions from many netfolk). 该命令应该也是仅用于 Linux 系统, 对于 UNIX 系统, ATA/IDE 硬盘用的可能比较少, 一般大型的系统都是使用磁盘阵列的. hdparm -Tt /dev/sda options -t 评估硬盘的读取效率。 -T 评估硬盘快取的读取效率。 /dev/sda: Timing cached reads: 6676 MB in 2.00 seconds = 3340.18 MB/sec ...

Created 18186-05-18 · Updated 18186-05-18 · 2 min · 249 words · -

scp

scp scp 可以在两个 linux 主机间复制文件; # 复制目录 -r scp -r local_folder remote_username@remote_ip:remote_folder ash: /usr/libexec/sftp-server: not found This is a consequence(结果/后果) of your client machine using a very recent OpenSSH release (9.0 - check https://www.openssh.com/txt/release-9.0 62 for more info), which changes the scp program to use the SFTP protocol under the hood, which vanilla OpenWrt/dropbear installations do not support. To work around the problem on the client side, use the new -O (that is an uppercase letter “o”) switch when invoking scp, which will cause it to fall back to the legacy behavior. ...

Created 8086-01-08 · Updated 8086-01-08 · 1 min · 205 words · -

nfs0

nfs # archlinux nfs-utils 包含客户端和服务端实现 sudo pacman -S nfs-utils # ubuntu, nfs client sudo apt install nfs-common nfs server nfs 依赖时钟, 需要 ntp 服务 archlinux enabled ntp by default https://blog.wiloon.com/ntp mkdir -p /data/nfs /mnt/nfs mount --bind /mnt/nfs /data/nfs vim /etc/fstab /mnt/nfs /data/nfs none bind 0 0 # NFS 服务的主配置文件 # 格式:[共享的目录] [主机名或IP(参数,参数)] vim /etc/exports /data/nfs *(rw,async,no_root_squash) # reload nfs config exportfs -arv # 查看 export dir exportfs -v sudo systemctl restart nfs-server sudo systemctl enable nfs-server showmount -e 127.0.0.1 nfs client linux client showmount -e servername mount server:/ /mountpoint/on/client windows client # 挂载之前先改注册表 需要读写权限的需要修改注册表 通过修改注册表将windows访问NFS时的UID和GID改成0即可,步骤如下 1. 在运行中输入regedit,打开注册表编辑器; 2. 进入HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default条目; 3. Create two DWORD values namely AnonymousUid and AnonymousGid,十进制值跟nfs服务端文件 所属用户 的用户 id一致。 # 重启windows的NFS client service C:\Windows\system32>hostname DESKTOP-AE0D2H0 C:\Windows\System32>nfsadmin client DESKTOP-AE0D2H0 config casesensitive=yes The settings were successfully updated. C:\Windows\system32>nfsadmin client DESKTOP-AE0D2H0 stop The service was stopped successfully. C:\Windows\system32>nfsadmin client DESKTOP-AE0D2H0 start The service was started successfully. C:\Windows\system32> #win10 mount nfs 打开控制面板 > 程序 > 启用或关闭 Windows 功能,找到NFS服务打开子目录勾选NFS客户端与管理工具。 showmount -e [server] 显示 NFS 服务器导出的所有共享。 showmount -a [server] 列出客户端主机名或 IP 地址,以及使用"主机:目录"格式显示的安装目录。 showmount -d [server] 显示 NFS 服务器上当前由某些 NFS 客户端安装的目录。 # 挂载nfs mount -o anon \\192.168.50.220\data\nfs\data Z:\ #卸载 umount z: https://wiki.archlinux.org/index.php/NFS#Installation ...

Created 8086-01-08 · Updated 8086-01-08 · 2 min · 271 words · -

vi basic, vim basic command

vi/vim basic, command commands vim -u NONE -N -n bigfile.txt # -u NONE: 不加载配置文件 # -u 后面跟的是要加载的配置文件路径。 # -u NONE:不加载任何配置,相当于“安全模式”或“干净模式”。 # -N: 启用现代兼容模式(非 Vi) # -n: 不创建 swap 文件 基本上 vi/vim 共分为三种模式,分别是命令模式(Command mode),输入模式(Insert mode)和底线命令模式(Last line mode) Command mode, 命令模式: 用户启动Vim之后,vim 默认是在命令模式。 Insert mode, 输入模式: i 切换到插入模式 Last line mode,底线命令模式: : 切换到底线命令模式 快捷键 ctrl + d 向下滚动半屏 ctrl + u 向上滚动半屏 基本插入 i: 在光标前插入;一个小技巧:按8,再按i,进入插入模式,输入=, 按 esc 进入命令模式,就会出现 8 个=。 这在插入分割线时非常有用,如`30i+<esc>`就插入了 36 个+组成的分割线。 I: 在当前行第一个非空字符前插入; gI: 在当前行第一列插入; a: 在光标后插入; A: 在当前行最后插入; o 小写 `o` 在当前行的下边插入新行, 在当前行的下边插入一行. O 大写 `O` 在当前行的上边插入新行. :r filename 在当前位置插入另一个文件的内容。 :[n]r filename 在第 n 行插入另一个文件的内容。 :r !date 在光标处插入当前日期与时间。同理,:r !command 可以将其它 shell 命令的输出插入当前文档。 escape/ESC 回到命令模式 ^v char 插入时忽略char的指定意义,这是为了插入特殊字符 vim 编辑二进制文件 # 注意用 -b,否则后面会有 0a vim -b test.bin # 以 16 进制格式查看 :%!xxd # 编辑完成后转换为二进制文件 :$!xxd -r :wq # force write :w! ### vim utf8 乱码 #### 查看文件编码 :set fileencoding # 临时显示行号 :set number # 不自动换行 :set nowrap # 自动换行 :set wrap 如果你只是想查看其它编码格式的文件或者想解决用 Vim 查看文件乱码的问题,那么你可以在 ~/.vimrc 文件中添加以下内容: ...

Created 15156-12-15 · Updated 15156-12-15 · 6 min · 1261 words · -

go basic, golang basic

go basic, golang basic The Go Programming Language, Go 语言虽然是静态编译型语言, 但是它却拥有脚本化的语法, 支持多种编程范式(函数式和面向对象)。 Go 是 Google 开发的一种静态强类型、编译型、并发型, 并具有垃圾回收功能的编程语言。 罗伯特·格瑞史莫, 罗勃·派克及肯·汤普逊于 2007年9月开始设计 Go, 稍后 Ian Lance Taylor, Russ Cox 加入项目。 Go 是基于 Inferno 操作系统所开发的。 Go 语言是静态类型的编程语言 go source code https://github.com/golang/go version latest: 1.23.0 current: 1.17.7 install # macos brew search golang brew upgrade golang hello world package main import "fmt" func main() { fmt.Println("hello world") } go run hello-world.go go build hello-world.go ./hello-world 升级依赖包版本, upgrade package version go list -m all|grep redis # go list 返回: github.com/redis/go-redis/v9 v9.0.2 # 升级 go-redis 版本 go get -u github.com/redis/go-redis/v9 # -u The -u flag instructs get to update modules providing dependencies of packages named on the command line # to use newer minor or patch releases when available. # 不带 -u 的 go get 在发现依赖包已经存在的时候不会更新, 加 -u 参数会检查依赖包是否有更新然后下载新版本. # 升级 go-redis 到 9.0.4 go get -u github.com/redis/go-redis/v9@v9.0.4 -u 更新包,包括他们的依赖项 -v 输出详细信息 http://studygolang.com/articles/1941 ...

Created 11116-12-11 · Updated 11116-12-11 · 7 min · 1425 words · -

JetBrains, idea, basic

JetBrains, idea, basic file> open recent, 点击打开项目的同时按 ctrl 会在新窗口打开 jetbrain> Git, 选中分支名 Ctrl + C 会复制分支名 HiDPI https://intellij-support.jetbrains.com/hc/en-us/articles/360007994999-HiDPI-configuration search everywhere (shift shift)> “Show HiDPI Info” vm option help> edit custom vm options> add line “-Dsun.java2d.uiScale.enabled=true” JetBrains keys, 快捷键 列编辑/column selection mode, Alt+Shift+Insert, Alt+Shift+i Expand All, Ctrl+Shift+= goto line: Ctrl + g ctrl + shift + k, git push ctrl + alt + y, reload from disk ctrl + alt + f, find in files ctrl + n, Down ctrl + p, Up ctrl + f, Right ctrl + b, Left ctrl + [, Move caret to code block start ctrl + ], Move caret to code block end ctrl + shift + i, generate date ctrl + shift + f, find in file ctrl + alt + l, reformat code ctrl + shift + o, Run ctrl + shift + up, move statement up ctrl + shift + down, move statement down alt + sift + up, move line up CTRL+SHIFT+N 查找文件 ...

Created 9096-12-09 · Updated 9096-12-09 · 2 min · 417 words · -

athens

athens, go package cache/repo 私服, go package 私有仓库, go package 服务器 Athens: Go Packages 服务器, 私服, go package 私有仓库, 其它可选方案 Nexus. nerdctl nerdctl volume create athens-data nerdctl run -d \ --name athens \ -p 4000:3000 \ -v athens-data:/var/lib/athens \ -e ATHENS_STORAGE_TYPE=disk \ -e ATHENS_DISK_STORAGE_ROOT=/var/lib/athens \ gomods/athens:v0.16.0 docker docker volume create athens-data docker run -d \ --name athens \ -p 4000:3000 \ -v athens-data:/var/lib/athens \ -e ATHENS_STORAGE_TYPE=disk \ -e ATHENS_DISK_STORAGE_ROOT=/var/lib/athens \ gomods/athens:v0.15.4 podman volume create athens-data vim /var/lib/containers/storage/volumes/athens-data/_data/download-mode downloadURL = "https://goproxy.cn" mode = "async_redirect" podman run -d \ --name athens \ -p 4000:3000 \ -v athens-data:/var/lib/athens \ -e ATHENS_DISK_STORAGE_ROOT=/var/lib/athens \ -e ATHENS_STORAGE_TYPE=disk \ -e ATHENS_DOWNLOAD_MODE=file:/var/lib/athens/download-mode \ gomods/athens:v0.15.4 GOPROXY=http://127.0.0.1:4000 && go get github.com/google/uuid@v1.4.0 GOPROXY=http://192.168.50.63:4000 && go get github.com/google/uuid@v1.4.0 https://docs.gomods.io/ ...

Created 29296-11-29 · Updated 29296-11-29 · 1 min · 118 words · -

ls command

ls command ls 默认列出当前目录的内容, ls 是 list 的缩写 ls 命令默认会按照文件名字母序排序 find $PWD | xargs ls -ld ls -lrth # -l 默认按文件名排序 ls -l # 只列出目录 ls -d foo* ls -dl foo* ls -l | grep ^d # 子目录所有文件 ls -lR|grep ^- ls -lR|grep ^-|awk '{print $9}' # 列出重复的行 ls -lR|grep ^-|awk '{print $9}'|sort|uniq -d 参数 -l 除文件名称外,亦将文件型态、权限、拥有者、文件大小等资讯详细列出 -t 选项,将首先按照文件的最后修改时间排序 (时间越新越靠前) ,之后再按字母顺序排 -i 打印出文件的 inode -R 列出所有子目录 -L 当文件是软链接时, 直接显示被链接的文件的信息 -T 结合 -l 可将时间显示为 hh:mi:ss 的形式,但不会按时间排序,因而不会影响默认字母排序 -S 按文件大小排序,越大越靠前 -u 结合 -l 选项可以看到每个文件最后被访问的时间,并且也会按该时间排序 以上影响排序的选项如果结合 -r 选项一起使用,则按相反顺序排列 ...

Created 17176-11-17 · Updated 17176-11-17 · 1 min · 87 words · -

scrum poker, 点数估算

scrum poker Scrum Poker Cards (Agile) Android, iOS https://artarmin.com/embed/#?secret=jkb2vbmib7 scrum poker online, 在线点数估算 https://www.scrumpoker-online.org/en/room/04930078

Created 17176-11-17 · Updated 17176-11-17 · 1 min · 14 words · -

chrome weak up api, keep screen on, 屏幕常亮

chrome weak up api, keep screen on, 屏幕常亮 chrome: enable-experimental-web-platform-features web 页面支持 https 才能使用 wake lock api android: 系统开启开发者模式 chrome 74 chrome://flags/#enable-experimental-web-platform-features Note: Like most other powerful web APIs, the Wake Lock API is only available when served over HTTPS. chrome 79+ Chrome Updates Experimental Wake Lock API Support https://www.infoq.com/news/2019/11/chrome-wakelock-api/#:~:text=The%20Wake%20Lock%20API%20prevents%20some%20aspect%20of,this%20feature%2C%20adding%20promises%20and%20wake%20lock%20types. To use the Wake Lock API, developers need to enable the #enable-experimental-web-platform-features flag in chrome://flags. chrome://flags enable-experimental-web-platform-features keep-screen-on.js export function wakeLock () { if ('wakeLock' in navigator && 'request' in navigator.wakeLock) { console.log('wakeLock supported') try { navigator.wakeLock.request('screen') console.log('Wake Lock is active') } catch (e) { console.error(`${e.name}, ${e.message}`) } } else { console.log('no wakeLock support') } } vue script <script lang="ts"> import HelloWorld from './components/HelloWorld.vue' import { Component, Vue } from 'vue-property-decorator' import { wakeLock } from './assets/keep-screen-on.js' @Component({ components: { HelloWorld } }) export default class App extends Vue { drawer = false foo = '' mounted () { this.$vuetify.theme.dark = true wakeLock() } } </script> demo https://wake-lock-demo.glitch.me/ ...

Created 8086-11-08 · Updated 8086-11-08 · 1 min · 170 words · -

三菱欧蓝德, Outland

三菱欧蓝德, Outland 机油 机油:矿物质 5000km,半合成 7500km,全合成 8000-10000km,平时行使道路越畅通,机油时效越长, 驾驶沉稳不经常暴力的,全年使用0W-20没问题(强烈推荐),此机油也特别适合北方冬季使用, 时常习惯开快车的建议全年 5W-30, 天天开暴力机车的,建议 5W-40;2,机油格(机油滤清器):每次换机油必须一同更换; 矿物机油 矿物机油以石油提炼的矿物油为基础,然后添加添加剂制造而成。矿物机油最普通,整体性能一般,价格最便宜,主要用于中低端车型,一般车辆每跑5000公里或者半年时间一换,时间和公里数以先到者为准; 全合成机油 全合成机油是化学合成的机油,成本较高,它的高低温性、高速润滑效果非常突出,一般用于中高档车型。涡轮增压车型因为其转速高、扭矩变化大,基本都是推荐使用全合成机油。全合成机油一般每10000公里或者一年一换,相比矿物机油更耐用,更换周期更长。 半合成机油介于矿物油和全合成机油之间,本身由矿物机油和全合成机油以4:6比例混合而成。一般每7500公里或者9个月一换。 时间或者公里数达到后尽快去更换机油,最好是不要超出1000-2000的公里,超过2000公里因为机油润滑保护作用的下降,继续使用将损害发动机。 0W-20, 5W-30 0W 的机油会在 -35℃ 的时候结冰 5W 代表耐外部低温 -30°C 20W 耐低温为 -15°C 前面的数字越小说明机油的低温流动性越好,代表可供使用的环境温度越低,在冷启动时对发动机的保护能力越好,如 5W 代表耐外部低温 -30°C,而 20W 耐低温为 -15°C。W 后面的数字代表机油在 100℃ 时的运动粘度,数值越高说明粘度越高。40 代表 100 摄氏度时运动粘度标准为 12.5mm2/s 到 16.3mm2/s 之间 根据说明书选择。原厂机油一般是厂家根据车辆发动机活塞与缸体间隙来选定,如换用高型号的机油,会使发动机有一定磨损。 根据公里数逐渐增加型号。前10万公里完全可以用20的机油,10 万到 20 万可以选择 30 的机油,20 万以后选择 40 的机油。但如果之前一直使用高型号的机油,建议最好还是不要降低型号。 根据使用地点选择型号。需要根据机油冷启动性能的指标来选择,比如你要是在南方,用5甚至10的绝对没有问题,如果在北部,最好用5甚至0开头的。 机滤 每次换机油的时候一起换; 机油滤芯也叫“机油滤清器”,其上游是机油泵,下游是发动机中需要润滑的各零部件。 轮胎 225 55 R18 胎压 240 kPa 2.4 bar 34.8 psi 三菱欧蓝德乘用车的原厂胎压标准是 2.3-2.5bar 都属于正常范围,最高不要超过3.0,最低不要低于2.1, 高一点没关系,但是低压非常危险。冷车和空车时测量胎压最为准确,如果低压非常低就该检查轮胎是否有漏气现象,不分前后轮,因为乘用车一般不存在承重问题, 胎压过大,会导致,轮胎与地面的基础面降低,可以降低油耗,但是也会影响制动力,胎压过低,会导致,轮胎侧壁直接磨损地面,过快,或过久行驶,导致侧壁破裂,甚至爆胎。 ...

Created 28286-10-28 · Updated 28286-10-28 · 1 min · 111 words · -

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 menu servi ces. Multiple -t options force tty allocation, even if ssh has no local tty -f:后台执行ssh指令 -N:不执行远程指令 -L listen-port:host:port 指派本地的 port 到达端机器地址上的 port, 建立本地SSH隧道(本地客户端建立监听端口), 将本地机(客户机)的某个端口转发到远端指定机器的指定端口. -v: verbose -vv: verbose -o: 指定配置选项, 具体参数看 “配置选项” 配置选项 StrictHostKeyChecking=no 忽略主机密钥验证 ssh -vv -T -oKexAlgorithms=ecdh-sha2-nistp521 git@foo.com KexAlgorithms: key exchange algorithm commands # 指定 shell 可以解决 This account is currently not available. sudo -u username -s /bin/bash ssh 不登陆直接执行命令 ssh root@192.168.50.31 "whoami" # 也可以用单引号 ssh root@192.168.50.31 'whoami' 指定私钥, 指定密钥 ssh -i /path/to/id_rsa 测试 ssh -T git@github.com ssh 强制使用密码登录, force ssh client to use only password auth ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no 192.168.50.1 -l root #debian sudo apt-get install openssh-server #archlinux sudo pacman -S openssh sudo /etc/init.d/ssh start|stop|restart ssh IP ssh IP -p 1234 -l root # ssh version ssh -V ubuntu sudo apt install openssh-server sudo systemctl start sshd -A option enables forwarding of the authentication agent connection There is a shortcut to archive this, if we don’t want to create a config file, we have another option, using -A flag with the ssh command. ...

Created 20206-10-20 · Updated 20206-10-20 · 4 min · 765 words · -

kodi, openelec

kodi, openelec LibreELEC 官网地址 https://github.com/LibreELEC/LibreELEC.tv LibreELEC 是从OpenELEC早期版本独立出来的一个分支. 与OpenELEC相比更精简, 更新更快(monthly updates), 官网文档详细, 更容易安装, 目前Kodi主页上的Friends列表, 只有LibreELEC, 没有OpenELEC. 目前大部分用户更倾向于使用LibreELEC. CoreELEC 官网地址 https://coreelec.org/ Github地址 https://github.com/CoreELEC/CoreELEC CoreELEC 是LibreELEC的一个分支, 专注于在Amlogic芯片方案上运行的Kodi. 如果你的盒子使用的是Amlogic系列芯片, 推荐使用这个. Kodi 官网地址 https://kodi.tv/ 首先是Kodi(曾经也叫XBMC), 是一个可以跨多平台运行的影音娱乐中心软件. 由XMBC/Kodi基金会资助开发. 是当前各种ELEC项目的鼻祖. https://github.com/taxigps/xbmc-addons-chinese OpenELEC 官网地址 https://openelec.tv/ OpenELEC(Open Embedded Linux Entertainment Center)是一个基于JeOS(Just Enough Operating System)的精简Linux, 用于将电脑变为可以运行Kodi的家庭媒体娱乐中心, 其功能包括影片管理和播放, TV播放, 相片浏览, 音乐播放. 因为不基于任何发行版, 所以OpenELEC的硬件驱动并不完整, 其优点在于提供了完整的管理界面, 普通用户完全可以通过界面管理系统而不需要使用命令行. OSMC 官网地址 https://osmc.tv/ OSMC 是一个基于Debian发行版的Kodi运行环境. 因为其基于Debian, 所以软件资源相当丰富. 相对应的, 运行OSMC需要的硬件要求相对LibreELEC要高. OSMC跟EmuELEC其实没什么关系, 但是既然都提到这么多了, 也顺带介绍一下. EmuELEC Github地址 https://github.com/EmuELEC/EmuELEC 终于介绍到主角了. EmuELEC基于CoreELEC和Lakka, 专注于在Amlogic芯片方案上运行的游戏模拟器, 主要是RetroArch, 附带一些PSP这类游戏的独立模拟器, 界面基于EmulationStation, 在游戏中可以调出RetroArch界面. EmuELEC相当于树莓派上RetroPie的Amlogic版. EmuELEC以前叫SX05RE, 从版本2.5开始, 改名为emuELEC, 专注于游戏功能, 不再集成Kodi. 常用的WiFi设置, 蓝牙设置等功能已经集成到主界面, 不需要通过Kodi来设置. ...

Created 14146-10-14 · Updated 14146-10-14 · 1 min · 85 words · -

lsof command

lsof command lsof means ‘List Open Files’ List all open files on the system or open files for specified PID 查看一个进程打开了哪些文件 #PID: 1098 sudo lsof -p 1098 ## 查看进程打开了哪些端口 # 以上命令返回的数据里 有 TCP 字样的就是 socket, 能看到端口号 install lsof # archlinux pacman -Sy lsof # ubuntu apt-get install -y lsof # centos yum install lsof -y 命令参数 -p <进程ID> 列出指定进程ID所打开的文件 -a 列出打开文件存在的进程 -c <进程名> 列出指定进程所打开的文件 -g 列出GID号进程详情 -d <文件号> 列出占用该文件号的进程 +d <目录> 列出目录下被打开的文件 +D <目录> 递归列出目录下被打开的文件 -n <目录> 列出使用NFS的文件 -i <条件> 列出符合条件的进程。4、6、协议、:端口、 @ip . -u 列出UID号进程详情 -h 显示帮助信息 -v 显示版本信息 查看 tcp 连接的建立时间 # 查看 tcp 连接 ss -nt|grep 50.32 # ESTAB 0 0 192.168.50.228:58048 192.168.50.32:2380 # 端口 :58048 lsof -i:58048 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME etcd 975 root 79u IPv4 8267566 0t0 TCP k8s0:58048->k8s2:2380 (ESTABLISHED) ...

Created 12126-10-12 · Updated 12126-10-12 · 5 min · 855 words · -

docker registry

docker registry install registry # 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 blobdescriptor: inmemory filesystem: rootdirectory: /var/lib/registry http: addr: :5000 headers: X-Content-Type-Options: [nosniff] health: storagedriver: enabled: true interval: 10s threshold: 3 EOF # https://hub.docker.com/_/registry # docker docker run -d \ --restart=always \ -v /usr/local/etc/docker-registry-config.yml:/etc/docker/registry/config.yml \ -p 5000:5000 \ --name docker-registry \ -v docker-registry:/var/lib/registry \ registry:2.8.3 # podman podman run -d \ -v /usr/local/etc/docker-registry-config.yml:/etc/docker/registry/config.yml \ -p 5000:5000 \ --name registry \ -v docker-registry:/var/lib/registry \ registry:2.8.3 buildah tag de3ebb1b260b registry.wiloon.com/pingd-proxy:v0.0.1 buildah push registry.wiloon.com/pingd-proxy:v0.0.1 podman pull registry.wiloon.com/pingd-proxy:v0.0.1 registry.wiloon.com/pingd-proxy registry.wiloon.com/ping-proxy docker 测试 sudo docker image tag hello-world registry.wiloon.com/myfirstimage sudo docker image ls sudo docker push registry.wiloon.com/myfirstimage sudo docker image rm hello-world sudo docker pull registry.wiloon.com/myfirstimage sudo docker image ls nginx config ...

Created 10106-10-10 · Updated 10106-10-10 · 2 min · 240 words · -

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 panel -> Task Manager Settings -> Only show tasks from the current screen ...

Created 2026-10-02 · Updated 2026-10-02 · 1 min · 141 words · -

正则表达式, regex

正则表达式, regex # PCRE # 10.0.0.0/8; 172.0.0.0/12; 192.168.0.0/16 ^[\d|\.|\/|;| ]+$ 元字符 描述 将下一个字符标记为一个特殊字符, 或一个原义字符, 或一个向后引用, 或一个八进制转义符。例如,“n” 匹配字符 “n”。"\n" 匹配一个换行符。 [中括号] []是定义匹配的字符范围 [xyz] 字符集合。匹配所包含的任意一个字符。例如,"[abc]"可以匹配"plain"中的"a"。 [^xyz] 负值字符集合。匹配未包含的任意字符。例如,"[^abc]"可以匹配"plain"中的"p"。 [a-z] 字符范围。匹配指定范围内的任意字符。例如,"[a-z]"可以匹配"a"到"z"范围内的任意小写字母字符。 [^a-z] 负值字符范围。匹配任何不在指定范围内的任意字符。例如, "[^a-z]"可以匹配任何不在"a"到"z"范围内的任意字符。 [A-Za-z0-9] 数字和26个英文字母组成的字符串 {大括号} {} 一般用来表示匹配的长度, 比如 \s{3} 表示匹配三个空格,\s{1,3} 表示匹配一到三个空格。 PCRE PCRE: Perl-compatible regular expressions ^ 匹配字符串的开始位置 $ 匹配字符串的结束位置 \ 将下一个字符标记为一个特殊字符(File Format Escape)、或一个原义字符(Identity Escape,有 ^$()*+?.[{| 共计12个)、或一个向后引用(backreferences)、或一个八进制转义符。例如,“n”匹配字符“n”。“\n”匹配一个换行符。序列“\”匹配“\”而“(”则匹配“(”。 . 匹配除 \r \n 之外的任何单个字符。要匹配包括 \r \n 在内的任何字符,请使用像 (.|\r|\n) 的模式。 * 匹配前面的子表达式零次或多次。例如,zo能匹配“z”、“zo”以及“zoo”。等价于{0,}。 + 匹配前面的子表达式一次或多次。例如,“zo+“能匹配"zo"以及"zoo”,但不能匹配"z”。+等价于{1,}。 (pattern) 匹配pattern并获取这一匹配的子字符串。该子字符串用于向后引用。所获取的匹配可以从产生的Matches集合得到,在VBScript中使用SubMatches集合,在JScript中则使用$0…$9属性。要匹配圆括号字符,请使用“\(”或“\)”。可带数量后缀。 ? 匹配前面的子表达式零次或一次。例如,“do(es)?“可以匹配"does"或"does"中的"do”。?等价于{0,1}。 {n} n 是一个非负整数。匹配确定的 n 次。例如,“o{2}“不能匹配"Bob"中的"o”,但是能匹配"food"中的两个o。 {n,} n 是一个非负整数。至少匹配n次。例如,“o{2,}“不能匹配"Bob"中的"o”,但能匹配"foooood"中的所有o。“o{1,}“等价于"o+"。“o{0,}“则等价于"o_"。 {1,3} 匹配一次到三次 linux 测试正则表达式 https://anjia0532.github.io/2017/06/29/nginx-regex-test-way/ ...

Created 15156-09-15 · Updated 15156-09-15 · 3 min · 601 words · -

VirtualBox

VirtualBox 显存 使用 4k 显示器的时候如果 virtualbox 显存设置的太小, 会导致黑屏. 剪贴板共享 Settings> General> Advanced> Shared Clipboard: Bidirectional NAT 端口转发 虚拟机> 设置> 网络> 网卡1> 高级> 端口转发> 添加 名称: ssh 协议: TCP 主机IP/host ip: 0.0.0.0 主机端口: 22 子系统IP: 10.0.2.15 子系统端口: 22 archlinux guest 在 virtual box 内安装的 archlinux, 需要安装 virtualbox-guest-utils, 可以获得更流畅的图形界面, 如 virtual 的无缝模式。 # for VirtualBox Guest utilities with X support sudo pacman -S virtualbox-guest-utils # for VirtualBox Guest utilities without X support sudo pacman -S virtualbox-guest-utils-nox # 启用 vboxservice, 否则无缝模式(seamless mode)的选项会是灰色的不可用状态 sudo systemctl --now enable vboxservice.service 剪贴板共享默认是关闭的, 在这里打开: Settings > General > Advanced > Shared Clipboard ...

Created 25256-08-25 · Updated 25256-08-25 · 2 min · 347 words · -

resolv.conf, systemd-resolved, DNS

resolv.conf, systemd-resolved, DNS # 查看版本 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 测试 域名解析 resolvectl query goproxy.cn resolvectl query baidu.com resolvectl query google.com 配置 vim /etc/systemd/resolved.conf [Resolve] # DNS: 上游的 dns 服务器, 可以配置多条, 用空格分隔 DNS=192.168.50.1 # FallbackDNS: 一个空格分隔的 IPv4 与 IPv6 地址列表。用作系统的替补 DNS 服务器。此选项所设置的 DNS 服务器仅在实在找不到可用 DNS 的情况下才会被使用。 FallbackDNS=223.5.5.5 223.6.6.6 114.114.114.114 #Domains= #LLMNR=yes #MulticastDNS=yes #DNSSEC=allow-downgrade #DNSOverTLS=no #Cache=yes #DNSStubListener=yes #ReadEtcHosts=yes # 重启服务 systemctl restart systemd-resolved # check systemd-resolved status resolvectl status # 确认状态 systemd-resolve --status link ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf archlinux ...

Created 3036-08-03 · Updated 3036-08-03 · 1 min · 139 words · -

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 快捷键 ctrl+F1 #切换工作区 列出已经配置的快捷键 xfconf-query -c xfce4-keyboard-shortcuts -l -v|grep thunar 修改 Applications> Settings> keyboard> application shortcuts passwordless login, xfce 免密码登录 https://wiki.archlinux.org/title/LightDM#Enabling_interactive_passwordless_login https://github.com/sgerrand/xfce4-terminal-colors-solarized /home/user0/.config/xfce4/terminal/terminalrc colorCursor=#93a1a1 ColorForeground=#839496 ColorBackground=#002b36 ColorPalette=#073642;#dc322f;#859900;#b58900;#268bd2;#d33682;#2aa198;#eee8d5;#002b36;#cb4b16;#586e75;#657b83;#839496;#6c71c4;#93a1a1;#fdf6e3 https://ethanschoonover.com/solarized/ https://github.com/altercation/solarized archlinux 登录后启动xfce4 https://wiki.archlinux.org/index.php/xinitrc ...

Created 12126-07-12 · Updated 12126-07-12 · 1 min · 102 words · -