url_for 默认产生的的外链地址是http, 如果要用https, 可以在url_for中加参数 _scheme='https'
url_for('secure_thingy',
_external=True,
_scheme='https',
viewarg1=1, ...)
280篇 Default中的文章
url_for 默认产生的的外链地址是http, 如果要用https, 可以在url_for中加参数 _scheme='https'
url_for('secure_thingy',
_external=True,
_scheme='https',
viewarg1=1, ...)
如果文件已经提交到了git仓库中,想加入到.gitignore, 可以这样做
git rm -r --cached 文件名/文件夹名
git提交即可
wsl无法使用,闪退。起初怀疑是wsl装的有问题,就将wsl按照 https://docs.microsoft.com/zh-cn/windows/wsl/install-win10 重新安装了一次。
安装了docker-desktop后 这个docker-desktop也是闪退。报出Failed to set version to docker-desktop: exit code: -1
这样的错误。
最终百度到:
powershell (管理员)下执行
netsh winsock reset
不用重启系统。即可。
这时docker-desktop也可以玩了。
curl with ipv6 sample code:
# interface 'eth0' is the interface with ipv6 enabled
curl -g -6 'http://[fe80::3ad1:35ff:fe08:cd%eth0]:80/'
curl -g -6 'http://[fe80::3ad1:35ff:fe08:cd]'
# https without ssl validate
curl -g -k -6 'https://[fe80::3ad1:35ff:fe08:cd]'
引言(Introduction):从基础概念出发,手把手抒写Linux CPU采集程序,并在后面的一个章节里简述经常出现的问题。本文主要环境以centos 7 上进行的一系列研究,其他版本Linux可能会有些出路,但总体思路不变。
/etc/fstab 是 Linux 和其他类 Unix 操作系统的配置文件,用于描述文件系统。它包含有关文件系统的位置、挂载点、文件系统类型和挂载选项的信息。
/etc/fstab 的每一行描述一个文件系统,格式如下:
<file system> <mount point> <type> <options> <dump> <pass>
<file system>
是文件系统的位置,可以是设备文件(如 /dev/sda1
)、分区 UUID(如 UUID=6c38203b-0ddc-4e35-a4a7-60733e8c1532
)或文件系统标签(如 LABEL=MyDataPartition
)。<mount point>
是文件系统在文件系统层次结构中的挂载点。<type>
是文件系统的类型,如 ext4
、xfs
或 swap
。<options>
是挂载该文件系统时使用的选项,如 rw
(可读写)、ro
(只读)或 noatime
(不更新访问时间)。<dump>
指定文件系统是否应由 dump
程序备份。0 表示不备份,1 表示备份。<pass>
指定文件系统在 fsck
程序检查文件系统时应经过的检查次数。0 表示不检查,1 表示检查一次,以此类推。以下是 /etc/fstab 中的一些常见示例:
/dev/sda1 / ext4 rw,relatime 0 1
/dev/sda2 /home ext4 rw,relatime 0 2
/dev/sda3 /data ext4 rw,relatime 0 3
/dev/sdb1 /mnt/backup ext4 rw,relatime 0 0
/dev/sdc1 swap swap defaults 0 0
在上面的示例中:
/dev/sda1
是根文件系统,挂载在 /
。/dev/sda2
是 /home
目录的文件系统,挂载在 /home
。/dev/sda3
是 /data
目录的文件系统,挂载在 /data
。/dev/sdb1
是备份文件系统,挂载在 /mnt/backup
。/dev/sdc1
是交换分区,用于虚拟内存。您可以使用 mount
命令挂载文件系统,也可以使用 umount
命令卸载文件系统。
有关 /etc/fstab 的更多信息,请参阅 man fstab
手册页。
使用这个git checkout filename
回退
如果用git reset --hard
会恢复所有未提交的!
The “server_tokens” directive is responsible for displaying the Nginx version number and Operating system on error pages and in the “Server” HTTP response header field as shown in the following screenshot.
To disable this, you need to turn off the server_tokens directive in /etc/nginx/nginx.conf configuration file.
vi /etc/nginx/nginx.conf
上一篇文章教了rabbitmq集群搭建。但是这样搭建出来的集群是3个IP:port。客户端一般只会填写一个Ip端口,这个时候就需要有个服务器去代理3个rabbitmq服务。这个时候haproxy就派上用场了。
架构图如下: