Skip to content

Instantly share code, notes, and snippets.

/**
* 说明信息
* 1.目录结构:
* ├── avatar.jpg
* ├── qrcode.jpg
* ├── share-image.js
* ├── simhei.ttf
* └── template.jpg
* 2.备注:若出现资源路径异常时,则使用path.join(__dirname, "./simhei.ttf")的方式进行资源加载
* 3.示例:
@lsloan
lsloan / vagrant_host.md
Last active September 21, 2022 13:53
Vagrant: host IP address from guest perspective

Unless specified otherwise in Vagrantfile, the IP address of the host (the computer running Vagrant) from the perspective of the guest (the VM being run by Vagrant) is: 10.0.2.2

If that IP address doesn't work, then examination of Vagrantfile should reveal directives that changed it from its default value.

If an IP address can't be found in Vagrantfile, then the following command will probably reveal it:

route -A inet
@plentz
plentz / nginx.conf
Last active March 28, 2025 17:48
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048