[TOC]
leanote的markdown编辑器支持基于MathJax编写LaTeX数学公式。
| Homebrew build logs for denji/nginx/nginx-full on macOS 12 | |
| Build date: 2022-03-02 15:52:11 |
| function cn-nodejs-env-setup() { | |
| local script=' | |
| const https = require("https"); | |
| const { exit } = require("process"); | |
| const url = "https://raw.githubusercontent.com/cnpm/binary-mirror-config/master/package.json"; | |
| https | |
| .get(url, (res) => { | |
| let body = ""; |
| -- PTS-style First-order dependent types | |
| -- usage examples | |
| -------------------------------------------------------------------------------- | |
| -- λ→ | |
| def plus_1_of_nat : Π _ : ℕ, ℕ := λ x : ℕ, x + 1 | |
| #check plus_1_of_nat | |
| #reduce Π _ : ℕ, ℕ |
| // https://coolshell.cn/t.html | |
| const scan = (xs, func, init) => | |
| xs.reduce( | |
| (accu, curr, i, arr) => [ | |
| ...accu, | |
| func(accu[accu.length - 1], curr, i, arr), | |
| ], | |
| [init], | |
| ); |
| // tslint:disable | |
| interface DeepReadonlyArray<T> extends ReadonlyArray<DeepReadonly<T>> {} | |
| type DeepReadonlyObject<T> = T extends Function | |
| ? T | |
| : { readonly [P in keyof T]: DeepReadonly<T[P]> }; | |
| export type DeepReadonly<T> = T extends any[] | |
| ? DeepReadonlyArray<T[number]> | |
| : T extends object |
| const genOpaqueType = x => "namespace _opaque{"+Array(x).fill().map((v,x)=>`declare const opaque_key_${x}:unique symbol;export interface t${x}{[opaque_key_${x}]:0}`).join(';')+"} /* prettier-ignore */ // tslint:disable-line" | |
| import * as React from "react"; | |
| declare module "react" { | |
| function memo<P>( | |
| Component:React.SFC<P>, | |
| propsAreEqual?:(( | |
| prevProps: Readonly<P & { children?: ReactNode }>, | |
| nextProps: Readonly<P & { children?: ReactNode }> | |
| )=>boolean |
| /* config-overrides.js */ | |
| const rewired = require('react-app-rewired'); | |
| function contailCSSLoader(obj) { | |
| const reg = /css-loader/; | |
| if (typeof obj === 'string') { | |
| return reg.test(obj); | |
| } |