Skip to content

Instantly share code, notes, and snippets.

View JLHwung's full-sized avatar

Huáng Jùnliàng JLHwung

  • Waterloo, ON, Canada
View GitHub Profile
@JLHwung
JLHwung / codemod.js
Created August 17, 2021 14:57
Transform @babel/types namespace import to named import
/**
input
```
import * as t from "@babel/types"
t.isIdentifier(node)
```
output
```
@JLHwung
JLHwung / problem.md
Last active June 8, 2022 14:21
The last problem of NCEE Math Guangdong 2022 (English translation)

Let $f(x) = e^x - ax$, $g(x) = ax - \mathrm{ln}x$, $f$ shares the minimum with $g$.

  1. Determine $a$
  2. Prove that there exists a line $y = b$, such that there are three different intersections of $y = b$, $y = f(x)$ and $y = g(x)$, and the x-coordinates of these points form an arithmatic sequence
@JLHwung
JLHwung / test.js
Created March 6, 2024 17:47
A small stress test on decorator transforms
class CaptureFactory {
static *id(fn) {
yield fn;
}
}
function dummy() {}
class C {}
class A extends CaptureFactory {