0%

生成product详情页的sitemap,放到public目录下,3w条一个sitemap,例如 sitemap1.xml sitemap2.xml ..

php artisan make:command GenerateSitemap

阅读全文 »

例如,要在 index.blade.php 文件中使用 OPPOSans-R 和 Arial-Regular 两种字体。

把 OPPOSans-R.ttf 和 Arial-Regular.ttf 放到项目根目录的fonts目录内,执行:
php ./load_font.php ‘OPPOSans-R’ fonts/OPPOSans-R.ttf

然后打开 storage/fonts/dompdf_font_family_cache.php 把 OPPOSans-R 部分数组复制备份。

再安装 Arial-Regular 字体:

php ./load_font.php ‘Arial-Regular’ fonts/Arial-Regular.ttf

打开 storage/fonts/dompdf_font_family_cache.php 发现 OPPOSans-R 部分内容丢失,只需要把之前复制的备份粘贴过来,就可以了。

在 index.blade.php 文件内这样使用

阅读全文 »

apt install haproxy

cat /lib/systemd/system/haproxy.service
得到配置文件位置:/etc/haproxy/haproxy.cfg

vim /etc/haproxy/haproxy.cfg

1
2
3
4
5
6
7
8
9
10
11
12
13
...
frontend myfrontend
bind *:880
mode tcp
default_backend mybackend

backend mybackend
mode tcp
balance roundrobin
server server1 xxx.xxx.xxx.xxx:80 check
server server2 xxx.xxx.xxx.xxx:80 check
server server3 xxx.xxx.xxx.xxx:80 check
...

systemctl start haproxy

访问 IP:880 端口,则服务器会代理客户端访问server1、2、3,并返回结果给客户端。

注意每次修改配置后要 systemctl restart haproxy 重载配置。

处理 Gitlab Issue 的事件,使用微信公众号的模板消息,提醒项目成员。

使用 Laravel 框架来接收 Gitlab 的事件,通过 gitlab 用户 email 和该用户的公众号 openid 的map,用公众号 push 模板消息 推送给对应的 openid

阅读全文 »

在uupdump.net下载Windows镜像,用worproject软件写入镜像到存储卡。

参考:
https://www.worproject.com/
https://uupdump.net/?lang=zh-cn&dark=1
https://www.bilibili.com/video/BV1fX4y137GQ
https://www.youtube.com/watch?v=UqbKgtxuyao

调整UEFI启动顺序,避免检查ipv4连接等动作,耗费等待时间。
启动显示Logo后:Boot Maintenance Manager→Boot Options→Change Boot Order
将UEFI设为第一启动项
参考资料:
https://blog.csdn.net/benandpao/article/details/123927373
https://forums.developer.nvidia.com/t/how-to-disable-network-bootup-scan-from-uefi-on-jetpack5-0-2/227034/7