🔥 Blazing fast builds
😇 CommonJS bundle
🌲 .mjs
bundle
✨ .d.ts
bundle + type-checking
🧐 Source maps
WebGPU 是一个让网页可以使用系统 GPU 来实现计算和绘制复杂图形并呈现在网页内部的 Web API 提案。目标和 WebGL 家族的 API 类似,但 WebGPU 可以访问更多更高级的 GPU 特性。在 WebGL 中,其主要用途是用于绘制图形,但是经过(相当大的努力的)改造才能用于计算,而 WebGPU 则是把 GPU 通用计算作为首要支持。
如下示例场景,未能被 WebGL 2 覆盖,需要使用 WebGPU:
- 绘制物体数量庞大、高度细节化的场景图形(例如 CAD 模型)。WebGPU 的绘制命令的性能消耗比 WebGL 低很多。
- 执行高级算法用于绘制逼真的场景。由于缺乏对通用计算的支持,许多现代渲染技术和优化不能在 WebGL 2 上实现。
Next.js, Nginx with Reverse proxy, SSL certificate
- UPDATE (07/20/2021):
- This process got simplified over the years of this gist being out
- Older version of this gist (without certbot): https://gist.github.com/kocisov/2a9567eb51b83dfef48efce02ef3ab06/33fdd88872a0801bdde58fccce430fa48737ae10
- I would also now recommend deploying to Vercel if you don't need custom server support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create context with no upfront defaultValue | |
// without having to do undefined check all the time | |
function createCtx<A>() { | |
const ctx = React.createContext<A | undefined>(undefined) | |
function useCtx() { | |
const c = React.useContext(ctx) | |
if (!c) throw new Error("useCtx must be inside a Provider with a value") | |
return c | |
} | |
return [useCtx, ctx.Provider] as const |
-
First, visit any repository on GitHub and click your way through to the issues page.
-
Create a new issue by clicking the New Issue button. You'll now see title and description fields.
-
Drag-and-drop an image onto the description field. This will start the uploading process.
-
Copy the URL and use it in README, issues or pull requests however you like.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules | |
build | |
npm-debug.log | |
.env | |
.DS_Store |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream example-webpack { | |
server 127.0.0.1:8080; | |
} | |
upstream example-backend { | |
server 127.0.0.1:3000; | |
} | |
server { | |
listen 80; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# As root user | |
sudo su | |
# Update the OS | |
apt-get update -y | |
# Add this to ~/.bashrc to remove timezone warnings | |
export LC_ALL="en_US.UTF-8" | |
source ~/.bashrc |