设置邮件对域名进行设置时,大部分的教程只是针对主域名。如果是用子域名呢,例如 mail.example.com。其实只要在其给出的针对主域名的设置的 host 的最后加上子域名就行了。
For DKIM -
Record type : TXT Host : mailer._domainkey Value : "v=DKIM1; k=rsa; p=LONGSTRING" [SOLVED]
You need to setup hostname like this
SPF hostname : mail DKIM hostname : mailer._domainkey.mail 参考链接:
Setting up SPF and DKIM records of a subdomain
Read more →
在一台全新安装的 Ubuntu 20.04 服务器版里,安装 golang 环境。
设置时区
sudo dpkg-reconfigure tzdata
安装 gcc 等工具,
sudo apt update sudo apt install build-essential Golang install. 其实不用弄 go workspace 之类的东西。 https://go.dev/doc/install
vi ~/.bashrc
将 go 的安装目录加入环境变量
export PATH=$PATH:/usr/local/go/bin
使其马上生效 source ~/.bashrc
将本地的证书的公钥添加到 ~/.ssh/authorized_keys
参考链接: How to Install GCC (build-essential) on Ubuntu 20.04 https://go.dev/doc/install How To Install Go and Set Up a Local Programming Environment on Ubuntu 18.04
Read more →
环境:Flutter 1.17.4, Dio 3.0.9
需要去接入某服务商的API,给的接口是 ip 地址,而不是域名,对方给了个文件(root certificate file) trusted-ca-certs.pem 用来验证 https 连接。看来他们是用的自签名的证书。
根据 参考链接1 去尝试会报错,OS Error: No such file or directory, errno = 2
原因是我忘记把 trusted-ca-certs.pem 写在 pubspec.yaml 里。
最终的代码如下:
Dio dio = new Dio(); ByteData bytes = await rootBundle.load('assets/trusted-ca-certs.pem'); (dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = (client) { SecurityContext sc = new SecurityContext(); sc.setTrustedCertificatesBytes(bytes.buffer.asUint8List()); HttpClient httpClient = new HttpClient(context: sc); return httpClient; }; 参考链接:
Dio https certificate verification
Add Certificate in Flutter
Read more →
Windows 10 有个欧盟版,叫 Windows N,它没有带 Windows 录屏功能。解决办法见参考链接。但有同事表示,即便装了也还是不行。-_-
参考链接:
Troubleshoot Xbox Game Bar on Windows 10
Read more →
Flutter 项目打包成 Xcode 后,会报 Module ‘flutter_blue’ not found
解决办法是:双击 Runner.xcworkspace 来打开 Xcode 而不是双击 Runner.xcodeproj
那么接下来就会问,.xcodeproj 和 .xcworkspace 有什么区别?
A workspace is a collection of projects. It’s useful to organize your projects when there’s correlation between them (e.g.: Project A includes a library, that is provided as a project itself as project B. When you build the workspace project B is compiled and linked in project A). It’s common to use a workspace in the popular CocoaPods.
Read more →
环境:Ubuntu 18.04
Discourse 是用 Docker 部署的,会有些 image 和 container 没有在使用,但占用着空间,这时可以把它们清掉
cd /var/discourse ./launcher cleanup 下图是跑 ./launcher cleanup 时的提示, it will purge all images not in use. 删除完后就只剩下一个 image 和一个 container 了,那个 image 跟那个 container 是关联的 参考链接:
Stuck in a loop of freeing up space and filling it up again when rebuilding
Read more →
这个问题在 Mac 上的 Terninal 有,换到 Windows 上就正常了,应该是改某个配置就行了,但我没去弄。
参考链接:
unable to run certbot –nginx - UnicodeDecodeError: ‘ascii’
Read more →
其实这个不难,关键是搜索时得带上 1804 。
参考链接:
Reset the password in Ubuntu / Linux Bash in Windows
Read more →
在 Catalina, iTunes 被集成到了 Finder。安装方法是在 Finder 左侧,选中 iPhone,然后把 ipa 文件拖进去即可。
当然你这设备的 UDID 得先加到苹果开发的后台才行。
参考链接:
How to load .ipa onto iPhone within Catalina?
Read more →
同事电脑的 SSD 被弄成两成分区,我想合并成一个分区,但两个分区之间隔着一个 Recovery Partition,就没法合并。因为合并的条件是这两个分区必须是相邻的。
解决办法那就先把 Recovery Partition 删了吧,按参考链接1的方法,没删成功,Cannot delete a protected partition without the force protected parameter set. 按 GPT 的方式去删的话,提示说这个分区不是 GPT 的。
后来按照参考链接2的命令搞定了。delete partition override.
搞定后,合并了分区,又想把那个 Recovery Partition 搞回来。试了下 reset windows 10,提示因为 Recovery Partition 没了,无法用重置功能了。网上有个说法是做个外置的恢复盘,然后它最后会提示你要不要把 Recovery Partition 删掉,但我做了,最后是没有这个提示的。最后下载个 ISO 镜像,重装系统解决了。
参考链接:
Can I Delete Recovery Partition in Windows 7/8/10 for Further Use
How to Delete a Windows Recovery Partition
Read more →