Skip to content

Instantly share code, notes, and snippets.

View jleem99's full-sized avatar
🎯
Focusing

JongHan Leem jleem99

🎯
Focusing
View GitHub Profile
@ju2wheels
ju2wheels / Dockerfile
Last active August 26, 2024 11:36
Docker Dockerfile reference template
# Last updated: 08/24/2916
#
# Total instructions available: 18
#
# https://docs.docker.com/engine/reference/builder/
#
# You can use a .dockerignore file in the same context directory as
# your Dockerfile to ignore files in the context before sending them
# to the Docker daemon for building to speed up building.
@yin8086
yin8086 / notepadRemoveLine.md
Created November 13, 2016 14:46
notepad++ remove odd even lines regex

notepad++ remove odd even lines regex

# remove even lines
([^\r\n]*\R)[^\r\n]*\R?
\1
# remove odd lines
@slikts
slikts / react-memo-children.md
Last active November 7, 2024 04:59
Why using the `children` prop makes `React.memo()` not work

nelabs.dev

Why using the children prop makes React.memo() not work

I've recently ran into a pitfall of [React.memo()][memo] that seems generally overlooked; skimming over the top results in Google just finds it mentioned in passing in a [React issue][regit], but not in the [FAQ] or API [overview][react-api], and not in the articles that set out to explain React.memo() (at least the ones I looked at). The issue is specifically that nesting children defeats memoization, unless the children are just plain text. To give a simplified code example:

const Memoized = React.memo(({ children }) => (<div>{children}</div>));
// Won't ever re-render
<Memoized>bar</Memoized>
// Will re-render every time; the memoization does nothing
@jleem99
jleem99 / README.md
Last active September 27, 2024 11:32
Bash script that enables Metal API for League of Legends on macOS

Bash script that enables Metal API for League of Legends on macOS.

After installing League of Legends, you can run this script to enable Metal API for the game.
You can expect a performance boost of up to ~2x FPS.

How to run

To run the script, download the script and run it in Terminal.
Or, open Terminal and type the following command: