0%

通过编译选项去除路径信息:

makefile可以增加以下编译选项:

1
2
3
-U__FILE__ -D__FILE__='"$(notdir $<)"' -Wno-builtin-macro-redefined
或者
-U__FILE__ -D__FILE__='"$(subst ($dir $<),,$<)"' -Wno-builtin-macro-redefined
阅读全文 »

模块简介

operator提供了和算术运算符一样高效的方法。
PS:该模块存粹是为了写C语言这种纯函数编程的代码,实用性仅仅在与map(),sorted()这些函数里面。实际没什么用

阅读全文 »

return语句

在函数中,return语句就意味着整个函数的终止并返回一个值,返回之后函数就不继续往下执行了

yield语句

而在函数中,如果是通过yield语句返回,那么yield会返回一个值,返回之后函数还可以继续往下执行

阅读全文 »

安装certbot(ubuntu 22.04 LTS)

1
sudo apt install certbot

获取证书

1
2
3
4
5
sudo certbot certonly --standalone -d example.com --agree-tos --email youremail@example.com

# -d example.com(需加密域名) 可多个-d参数
# --email youremail@example.com(可用邮箱)
# --agree-tos 同意服务协议
阅读全文 »

ssh-key

Linux

生成公私钥:

1
2
3
4
5
ssh-keygen -t rsa -C 'youremail@example.com' -f ~/.ssh/github_id_rsa
一直回车生成ssh-key

'youremail@example.com' 改为自己的邮箱地址
-f 指定文件名路径 #可以省略,默认生成文件名 ~/.ssh/id_rsa
阅读全文 »