Skip to content

Instantly share code, notes, and snippets.

@ThaddeusJiang
ThaddeusJiang / bug_report.md
Last active March 4, 2020 02:39
[issue template] bug report

Describe the bug

To Reproduce

Expected behavior

Screenshots

@ThaddeusJiang
ThaddeusJiang / chrome-extensions.md
Created October 7, 2019 09:53
chrome extensions
  • work

    • react dev
    • Gyazo
    • Grammarly
    • Mailtrack
    • github contributions
    • Octotree
    • Toby for Chrome
  • personal

@ThaddeusJiang
ThaddeusJiang / readme.md
Created June 7, 2019 01:19
postgresql handbook

install

brew install postgresql

usage

  1. 登录 psql

  2. 查看所有用户 \du

@ThaddeusJiang
ThaddeusJiang / README.md
Last active May 29, 2019 03:20
CSS Reset

CSS Reset 目的是消除不同浏览器上样式不统一的问题。

但是,并不是所有项目都需要 CSS Reset。

  • CSS Reset 可能会影响性能,并大量冗余。

武侠的最高境界是什么? - 无招胜有招

  • 设计的最高境界是什么? - 减少设计
  • 最少的 CSS 代码,最少的渲染,最少的重置就是最好的 CSS 样式代码,这反映了 CSS 层次。 说句不好听的话,CSS reset是用来让那些CSS菜鸟,对CSS不太了解的人准备的。
@ThaddeusJiang
ThaddeusJiang / js-blob-to-string.md
Created May 29, 2019 00:16
Convert Blob to String in JavaScript [cn] 字节转字符串

TL;DR: Use the readAsText() method.

Example

const blb    = new Blob(["Lorem ipsum sit"], {type: "text/plain"});
const reader = new FileReader();

// This fires after the blob has been read/loaded.
reader.addEventListener('loadend', (e) => {
 const text = e.srcElement.result;
@ThaddeusJiang
ThaddeusJiang / git-cz.md
Created May 22, 2019 06:58
git cz, beautiful commit log
@ThaddeusJiang
ThaddeusJiang / index.js
Created May 21, 2019 04:34
RunKit require specific version
require("[email protected]")
@ThaddeusJiang
ThaddeusJiang / React-lazy-API.md
Created May 9, 2019 10:38
When should use React.lazy, and why?

When should use React.lazy, and why?

  • React.lazy 解决了什么问题?

延迟加载,提高性能。

  • 那么有每一个 Component 都使用 lazy 吗?

显然用?

@ThaddeusJiang
ThaddeusJiang / 过早优化是万恶之源
Created May 9, 2019 10:38
Premature optimization is the root of all evil
> Premature optimization is the root of all evil — DonaldKnuth
过早优化是万恶之源。
不需要在 Code Review 时,过早挑剔性能。