Wake Me Up When September Ends.

A wanderer capable of grasping the beauty of the grass, with a heart full of ancient charm, and a fondness for playful wit. Those who understand my words are knowledgeable individuals; those who decipher my code truly comprehend the essence. I am a wandering code swordsman, carrying my skills and riding freely through the digital world.

是为了方便自己的技术栈查阅,以及较遗忘知识点快速找到,所以我也建立了这个站点。

地址❤️:开发工具-速查表!http://ref.zyimm.com

如果需要自己部署,可以参考如下docker部署:

docker 安装

# 拉取镜像
docker pull wcjiang/reference
# 自定义端口
docker run --name reference --rm -d -p 9667:3000 wcjiang/reference:latest
# Or
docker run --name reference -itd -p 9667:3000 wcjiang/reference:latest
阅读全文 »

Ubuntu的desktop文件相当于windows的桌面软件快捷方式,可以在任何地方快速打开软件。记录一下Ubuntu系统中desktop文件的位置。

方便以后处理删除程序或新增程序时候,桌面图标不正确的问题。

1 用户的desktop 文件位置

~/.local/share/applications

2 公共的 desktop 文件位置,如有重复,用户自己desktop文件优先

/usr/share/applications
阅读全文 »

systemd服务单元文件主要放在/usr/lib/systemd/system/etc/systemd/system目录下,文件一般以 .service 为后缀。找到配置文件以后,使用文本编辑器打开即可。

也可以systemctl cat命令可以用来查看配置文件。

systemd服务单元文件

systemd服务单元文件是服务系统自启动的一种脚本。以下是一个示例:

[Unit]
Description=My Sample Service
After=network.target

[Service]
Type=simple
ExecStart=/usr/bin/php /path/to/your/script.php
Restart=always

[Install]
WantedBy=multi-user.target
阅读全文 »

在php中我了解目前有reactphp和guzzle组件实现javascript的Promises/A标准。promise被定义一种用于表示异步操作结果的对象,该对象链式调用(then)避免了一些异步操作多层嵌套和回调地狱问题,提高了异步操作的处理更加清晰和可维护性。

promise 对象有三种状态:pending(进行中)、fulfilled(已成功)和 rejected(已失败)。当异步操作执行完成时,Promise 对象的状态会从 pending 转变为 fulfilled 或 rejected,表示操作成功或失败。我们可以通过 then() 方法来处理这些状态的变化,并执行相应的操作。

阅读全文 »