德国computeruniverse网上商城成立于1999年9月2日,主要销售各种电子产品、小家电、照相机、游戏机、手机等,支持直邮中国,运费低至27欧元,而且自动退税19%!海淘brita滤水壶、Severin斯维林酸奶机、BEURER IH 50雾化器、Unold面包机、Sanitas SBM 血压器、beurer空气净化器、dyson吸尘器、博雅Beurer IL50远红外线治疗仪等的好地方!如果您第一次在computeruniverse海淘,使用新人优惠码FWWMFRL3还可以享受5欧元的优惠。
新人5欧元优惠码:FWWMFRL3
275篇 Default中的文章
nginx加上basic auth验证
- 2021/5/20 09:07
- Default
- 1393
创建密码文件
htpasswd -c -d htpasswd -c -d /etc/nginx/conf.d/passwd username
在nginx配置文件中加上:
auth_basic "validate required";
auth_basic_user_file /etc/nginx/conf.d/passwd;
重启nginx服务即可
- name: set hostname
hostname:
name: "pardus"
ansible execute failed on aarch64 platform, to fix this:
- name: set hostname
hostname:
name: "pardus"
use: systemd
append use: systemd
.
yum -y install dhcp
配置文件:/etc/dhcp/dhcpd.conf
示例配置文件:/usr/share/doc/dhcp-4.2.5/dhcpd.conf.example
default-lease-time 7200;
max-lease-time 14400;
subnet 10.1.119.0 netmask 255.255.255.0 {
option routers 10.1.119.128;
option domain-name-servers 10.1.102.2;
range 10.1.119.200 10.1.119.220;
}
参考 https://help.eyeo.com/en/adblockplus/how-to-write-filters
- 通配符支持,如
*.example.com/*
实际书写时可省略 * 如.example.com/
意即*.example.com/*
- 正则表达式支持,以\开始和结束, 如
\[\w]+:\/\/example.com\
- 例外规则 @@,如
@@*.example.com/*
满足@@后规则的地址不使用代理 - 匹配地址开始和结尾 |,如
|http://example.com
、example.com|
分别表示以http://example.com
开始和以example.com
结束的地址 - || 标记,如
||example.com
则http://example.com
、https://example.com
、ftp://example.com
等地址均满足条件,只用于匹配地址开头 - 注释 ! 如 ! Comment
- 分隔符^,表示除了字母、数字或者 _ - . % 之外的任何字符。如
http://example.com^
,http://example.com/
和http://example.com:8000/
均满足条件,而http://example.com.ar/
不满足条件
文件系统挂了,变成只读模式。supervisor无法启动,就连ping 域名时无法解析dns,想要修改/etc/resolve.conf,只读也写不进去。
试下往临时目录写也是这:
touch /tmp/aaa.txt
touch: cannot touch '/tmp/aaa.txt': Read-only file system
unix:///tmp/supervisor.sock no such file
- 2021/3/20 02:17
- Default
- supervisor linux
- 1730
To fix this:
sudo touch /var/run/supervisor.sock
sudo chmod 777 /var/run/supervisor.sock
supervisord
You can use vim programmatically with the option -c {command} :
Dos to Unix:
vim file.txt -c "set ff=unix" -c ":wq"
Unix to dos:
vim file.txt -c "set ff=dos" -c ":wq"
"set ff=unix/dos" means change fileformat (ff) of the file to Unix/DOS end of line format
":wq" means write file to disk and quit the editor (allowing to use the command in a loop)
开源地址:https://github.com/fdddf/vue3-aplayer
项目fork自 https://github.com/SevenOutman/vue-aplayer
适配vue3,需要vue3.0.7支持,更新了相关依赖。
找出已删除文件的提交记录:
git rev-list -n 1 HEAD -- <file_path>
返回为commit id
使用提交记录ID检出文件, commit id后缀**^**:
git checkout <commit id>^ -- <file_path>
或者一行命令:
$file 是文件路径
git checkout $(git rev-list -n 1 HEAD -- "$file")^ -- "$file"