redis string

redis string Redis 字符串数据类型的相关命令用于管理 redis 字符串值 template 1 2 3 4 5 6 7 8 9 SET key value [EX seconds] [PX milliseconds] [NX|XX] EX、PX、NX、XX 是 redis 2.6.12 版本添加的可选参数 EX second: 设置键

chrome os, chromeos basic

chrome os, chromeos basic chrome os 多桌面 https://support.google.com/chromebook/answer/9594869?hl=en Drag windows and apps to your preferred desk. Or use shortcuts: Move a window to a new desk: Right-click the top of a window then, select Move window to another desk. Make a window or app available across all desks: Right-click the top of a window, then select Show in all desks. crosh Crosh stands for “Chr

easy-rsa

easy-rsa 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 #debian apt-get install easy-rsa mkdir /etc/openvpn cp -r /usr/share/easy-rsa /etc/openvpn/ cd /etc/easy-rsa vim vars ./clean-all ./build-ca ./build-key-server server0 ./build-key client0 #--- pacman -S easy-rsa cd /etc/easy-rsa export EASYRSA=$(pwd) easyrsa init-pki easyrsa build-ca scp /etc/easy-rsa/pki/ca.crt foo@hostname-of-openvpn-server:/tmp/ca.crt #OpenVPN server machine mv /tmp/ca.crt /etc/openvpn/server/ chown root:root /etc/openvpn/server/ca.

OpenVPN 使用账号+密码方式登陆

OpenVPN 使用账号+密码方式登陆 http://openwrt.iteye.com/blog/2306421 https://xu3352.github.io/linux/2017/06/08/openvpn-use-username-and-password-authentication OpenVPN 使用账号+密码方式登陆 使用账号+密码方式方便给多人分配不同的账号和密码,多人使用更加方便 原文链接: 配置Open

openvpn 开放端口

openvpn 开放端口 Network> Firewall> Traffic Rules> Open ports on router 以80端口为例: Name: Allow HTTP (这个名字可以随便填) Protocal: TCP External port: 80 然后点击 Save & Apply ,就可以访问了 http://www.anywlan.com/thread-432580-1-1.html

Trusting additional CAs in Centos

Trusting additional CAs in Centos place the certificate to be trusted (in PEM format) in /etc/pki/ca-trust/source/anchors/ 1 2 3 cp xxx.pem /etc/pki/ca-trust/source/anchors/ update-ca-trust enable sudo update-ca-trust

openwrt install

openwrt install build R7800, Build custom Netgear R7800 firmware for a larger flash size/root space http://blog.wiloon.com/?p=12113&embed=true#?secret=Z4x4I19l6b burn netgear 刷机, factory.img, sysupgrade.bin http://blog.wiloon.com/?p=12826&embed=true#?secret=G3qiDnmUJx 改网段 openwrt lan 改网段 http://blog.wiloon.com/?p=12761&embed=true#?secret=XiBcmLWKRM openvpn https://openwrt.org/docs/guide-user/services/vpn/openvpn/basic enable https for wget opkg install librt openssl-util opkg install wget ca-certificates

netgear 刷机, factory.img, sysupgrade.bin, openwrt

‘netgear 刷机, factory.img, sysupgrade.bin, openwrt’ xxx-factory.img 把网线连接路由器的 LAN 口 和 PC 的网口 路由器断电, 用牙签或其他工具, 捅路由器的 reset 口 开启设备电源开关, 观察电源灯 (此时保持按住 reset/ Restore Factory

KVM-Qemu-Libvirt

KVM-Qemu-Libvirt http://blog.51cto.com/changfei/1672147 KVM-Qemu-Libvirt 三者之间的关系 Qemu Qemu是一个模拟器,它向Guest OS模拟CPU和其他硬件, Guest OS认为自己和硬件直接打交道,其实是同Qemu模拟出来

google 搜索

google 搜索 转义, 加引号 1 linux "-xxx" 特定域 1 2 site: 在特定域中进行搜索 -site: 排除特定域 文件类型 1 filetype: PDF

按日期删除文件

按日期删除文件 1 2 3 4 5 6 7 # 列出30天前的日志 find /data/logs -mtime +30 -type f -name "*.*" # 删除30天前的日志 find /data/logs -mtime +30 -type f -name "*.*" -exec rm -f {} \; # 删除3天前的所有以"

go mod

go mod create project 1 2 mkdir project-0 go mod init project-0 1 go mod edit [editing flags] [go.mod] commands 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 # upgrade go version to 1.21.4 go mod edit -go 1.21.4 export GO111MODULE=on go mod init project0 # 初始化 go mod tidy # 拉取缺少的模

linux tar aes 打包加密

linux tar aes 打包加密 1 2 3 4 5 6 7 8 9 10 11 12 13 tar -cvf - foo | openssl enc -e -aes256 -k password -out foo.tar openssl enc -d -aes256 -in foo.tar -k password | tar xv openssl enc -d -aes256 -in foo.tar -k password | tar xv -C . #原文件 foo #密码 password #目标文

linux 替换 换行符

linux 替换 换行符 1 2 3 cat out | python -c "import sys; print sys.stdin.read().replace('.\n','.')" http://slash4.net/blog/python/sed-replace-newline-or-python-awk-tr-perl-xargs.html http://slash4.net/blog/python/sed-replace-newline-or-python-awk-tr-perl-xargs.html/embed#?secret=fepFl2MtVM

linux tools

linux tools Linux Performance Observability Tools https://hub.docker.com/r/nicolaka/netshoot https://linuxtools-rst.readthedocs.io/zh_CN/latest/tool/ldd.html ldd 作用: 用来查看程式运行所需的共享库,常用来解决程式因缺少某个库文件而不能运行的一些问题。 示例: 查看test程序运行所依赖的

pam config

pam config pam模块文件内容看,可以将pam配置文件分为四列, 第一列代表模块类型 第二列代表控制标记 第三列代表模块路径 第四列代表模块参数 Module_type 将为 Service_name 字段

创建/删除tun/tap设备

创建/删除tun/tap设备 ip tuntap add dev tun0 mode tun ip tuntap add dev tap0 mode tap ip tuntap del dev tun0 mode tun #for detail ip tuntap help https://my.oschina.net/dangzy/blog/221893

nftable, nft basic, nft commands

nftable, nft basic, nft commands 安装 nftables archlinux 1 2 3 sudo pacman -S nftables sudo systemctl start nftables sudo systemctl enable nftables centos 8 1 2 systemctl disable --now firewalld 表, table 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 # 列出所有