🔥 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 |
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
https://gorails.com/deploy/ubuntu/18.04#vps |
-
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
参考 https://mirror.tuna.tsinghua.edu.cn/help/CocoaPods/ | |
对于旧版的 CocoaPods 可以使用如下方法使用 tuna 的镜像: | |
``` | |
$ pod repo remove master | |
$ pod repo add master https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git | |
$ pod repo update | |
``` | |
新版的 CocoaPods 不允许用pod repo add直接添加master库了,但是依然可以: |
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
POWERLEVEL9K_MODE=nerdfont-complete | |
POWERLEVEL9K_PROMPT_ON_NEWLINE=true | |
POWERLEVEL9K_RPROMPT_ON_NEWLINE=true | |
POWERLEVEL9K_SHORTEN_DIR_LENGTH=2 | |
POWERLEVEL9K=truncate_beginning | |
POWERLEVEL9K_TIME_BACKGROUND=black | |
POWERLEVEL9K_TIME_FOREGROUND=white | |
POWERLEVEL9K_TIME_FORMAT=%D{%I:%M} | |
POWERLEVEL9K_STATUS_VERBOSE=false | |
POWERLEVEL9K_VCS_CLEAN_FOREGROUND=black |
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
当我们brew update或者brew install xxx时,异常的慢,本事原因还是国内网络环境github下载慢导致。 | |
我们可以更换Homebrew源, 从https://mirrors.ustc.edu.cn/上搜索各对应的源 | |
cd "$(brew --repo)" (正常放置在/usr/local/Homebrew) | |
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git/ | |
# 替换homebrew-core | |
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" | |
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git/ |
NewerOlder