Skip to content

Instantly share code, notes, and snippets.

View leegeunhyeok's full-sized avatar
🎯
Focusing

Geunhyeok LEE leegeunhyeok

🎯
Focusing
View GitHub Profile
@leegeunhyeok
leegeunhyeok / repro.js
Created May 26, 2026 16:46
Minimal repro for Hermes class-expression spill miscompile
var values = [];
function sideEffect(value) {
values.push(value);
return value;
}
var a0 = "0000";
sideEffect(a0);
var a1 = "0001";
sideEffect(a1);
var a2 = "0002";
@leegeunhyeok
leegeunhyeok / hhkb-layout.json
Created January 15, 2026 15:16
Oblique 60 Setups
{
"name": "Oblique60",
"vendorProductId": 1329725536,
"macros": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],
"layers": [
[
"KC_ESC",
"KC_1",
"KC_2",
"KC_3",
@leegeunhyeok
leegeunhyeok / index.js
Created December 17, 2025 18:36
Hermes V1 (250829098.0.4) Block Scoping Test
const values = ['a', 'b', 'c'];
const captures = {};
for (let i = 0; i < values.length; i++) {
const value = values[i];
captures[value] = () => {
console.log(value);
};
}
const globalMachine = Machine(
{
predictableActionArguments: true,
initial: 'idle',
context: {
user: null,
},
states: {
@leegeunhyeok
leegeunhyeok / machine.js
Last active January 28, 2023 17:52
Generated by XState Viz: https://xstate.js.org/viz
const TAG = 'GlobalMachine';
const AsyncStorage = localStorage;
Machine(
{
id: TAG,
initial: 'idle',
context: {
user: null,
},
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
export TERM=xterm-256color
unsetopt nomatch
# Set name of the theme to load --- if set to "random", it will
@leegeunhyeok
leegeunhyeok / ghlee.itermcolors
Last active December 19, 2023 07:27
My iTerm2 profile
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.0</real>
@leegeunhyeok
leegeunhyeok / example.tsx
Last active May 6, 2021 17:41
Awesome Logger for React.Profiler
<Profiler id="MyComponent" onRender={console.profile}>
<Component />
</Profiler>
@leegeunhyeok
leegeunhyeok / eval_only_once.js
Created October 8, 2020 05:23
Eval only once
let init = false;
const doSomething = () => {
if (!init && (init = true)) {
console.log('Only once');
return;
}
console.log('Do something');
}
doSomething(); // Only once
@leegeunhyeok
leegeunhyeok / get_week_number.js
Created October 8, 2020 04:06
📅 특정 날짜 기준으로 당월 N주차 구하기
/**
* 특정 날짜 기준으로 당월 N주차 구하기
* @author dev.ghlee@gmail.com
*/
/**
* 지정된 날짜가 몇 주차인지 계산하여 반환합니다
* @param {Date} dateFrom 주차 계산을 위한 기준 날짜
*/