Skip to content

Instantly share code, notes, and snippets.

View soomtong's full-sized avatar
๐Ÿ˜‡

YoungTaek soomtong

๐Ÿ˜‡
View GitHub Profile
@SandroMaglione
SandroMaglione / debounce-machine.ts
Created May 19, 2025 03:19
Input check debounce state machine using `xstate` โฑ๏ธ
const debounceMachine = setup({
types: {
events: {} as { type: "edit"; text: string },
},
actors: {
check: fromPromise(
// ๐Ÿ‘‡ Use `signal` to abort the promise if the user starts typing
({ input, signal }: { input: { text: string }; signal: AbortSignal }) =>
Promise.resolve(input.text)
),
@ADIOP55550
ADIOP55550 / .ideavimrc
Last active November 6, 2025 17:33
Helix-like config for IdeaVim
" Based on comment by mchlstckl
" https://www.reddit.com/r/HelixEditor/comments/14aqztf/comment/jocslxs/
" Check the history of this gist for a changelist
" Read NOTES and WARNINGS lower
" Must be done first to tell other plugins that <space> is the leader key
let mapleader=" "
@adibhanna
adibhanna / keymap.json
Created April 18, 2024 17:55
zed keymaps
[
{
"context": "Editor && VimControl && !VimWaiting && !menu",
"bindings": {
"ctrl-w z": "workspace::ToggleZoom",
"ctrl-w t": "terminal_panel::ToggleFocus",
"g ]": "editor::GoToDiagnostic",
"g [": "editor::GoToPrevDiagnostic",
"g r": "editor::FindAllReferences",
"shift-k": "editor::Hover",
@amiorin
amiorin / README.md
Last active August 31, 2025 10:37
How to configure Home Row Mods with KMonad on macOS

Intro

Karabiner and KMonad are great open source software. Don't forget to support the authors and contributors.

If you want to try home row mods on OSX, don't use Karabiner but KMonad. KMonad is harder at the beginning but then it is easier than Karabiner. Creating layers in KMonad is trivial and without drawbacks, while it is impossible in Karabiner without drawbacks.

You need to compile a PR of the project. Install https://github.com/pqrs-org/Karabiner-DriverKit-VirtualHIDDevice/releases/download/v2.1.0/Karabiner-DriverKit-VirtualHIDDevice-2.1.0.pkg

@mikesparr
mikesparr / gcp-global-lb-multi-region-cr-ce.sh
Last active May 16, 2025 13:08
Demonstrating how you can deploy Cloud Run (serverless) or Compute Engine instance groups across regions and balance with global load balancer
#!/usr/bin/env bash
#####################################################################
# REFERENCES
# - https://cloud.google.com/run/docs/multiple-regions
# - https://cloud.google.com/compute/docs/instance-groups/distributing-instances-with-regional-instance-groups
# - https://cloud.google.com/load-balancing/docs/https/setup-global-ext-https-compute
# - https://cloud.google.com/load-balancing/docs/backend-service#named_ports
#####################################################################
@kconner
kconner / macOS Internals.md
Last active November 6, 2025 09:43
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@leoh0
leoh0 / README.md
Last active April 28, 2025 04:23
mac ์—์„œ docker-desktop ์„ lima๋กœ ๋Œ€์ฒดํ•˜๊ธฐ lima-docker.sh ์‹คํ–‰

mac ์—์„œ docker-desktop์„ ๋Œ€์ฒดํ•˜๊ธฐ

https://gist.github.com/leoh0/3b3c908f0e931d7c620d273c77ea3757

docker-desktop ๋ฅผ 2022๋…„ 1์›” 31์ผ๊นŒ์ง€ ๋Œ€์ฒดํ•ด์•ผ ํ•˜๊ธฐ์— ๋‹ค๋“ค ์—ฌ๋Ÿฌ ๋ฐฉ๋ฒ•์„ ์‚ฌ์šฉํ•˜์‹ค ๊ฒƒ ๊ฐ™์€๋ฐ windows์—์„œ๋Š” ์‚ฌ์‹ค wsl2 ๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด์„œ docker ๋ฅผ ๊ทธ๋Œ€๋กœ ๊น”์•„์„œ ์“ธ ์ˆ˜ ์žˆ๋‹ค๋Š” ๊ฒƒ ๋•Œ๋ฌธ์— ํฐ ์ œ์•ฝ์—†์ด(eg. wsl์ด ๊ฒฐ๊ตญ ๋ธŒ๋ฆฟ์ง€๋ฅผ ๊ฑฐ์น˜๊ธฐ ๋•Œ๋ฌธ์— vpn๋“ฑ ์‚ฌ์šฉ์‹œ mtu ์กฐ์ ˆ์ด ํ•„์š”ํ•  ์ˆ˜ ์žˆ๋Š” ์ œ์•ฝ์ด ์žˆ์Œ)์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ๋ฐ ๋งฅ์€ ์‚ฌ์‹ค linux ์Šคํƒ์„ ๊ทธ๋Œ€๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์—†๊ธฐ๋•Œ๋ฌธ์— vm์„ ์˜ฌ๋ ค์•ผ ํ•˜๋Š” ์ƒํƒœ์ž…๋‹ˆ๋‹ค.

๋ถˆํŽธํ•œ ์ 

ํ•˜์ง€๋งŒ ์ด์— ๋”ฐ๋ผ ์—ฌ๋Ÿฌ๊ฐ€์ง€ ๋ถˆํŽธํ•œ ์ ๋“ค์ด ์žˆ์Šต๋‹ˆ๋‹ค.

@doortts
doortts / escape_to_en.json
Last active April 29, 2021 14:29
vim ์ด๋‚˜ IdeaVim ์—์„œ esc ๋ˆ„๋ฅผ ๋•Œ ์˜๋ฌธ์œผ๋กœ IME ๋ณ€๊ฒฝํ•˜๋Š” Rule (Mac + Karabiner)
// ~/.config/karabiner/assets/complex_modifications/escape_to_en.json ์— ํŒŒ์ผ ์œ„์น˜์‹œํ‚ด
// Complex modifications ์—์„œ ์œ„ ๊ทœ์น™ ์ถ”๊ฐ€
// bundle_identifiers ๋Š” Karabiner-EventViewer ๋ฅผ ์ด์šฉํ•ด์„œ ์ฐพ๋Š”๋‹ค
//
// See: https://github.com/johngrib/simple_vim_guide/blob/master/md/with_korean.md
{
"title": "Convert to en when ESC",
"rules": [
{
"description":"Convert to en when ESC",
@hyrious
hyrious / nodejs-on-exit.js
Created November 22, 2020 05:04
how to do something before exit in NodeJS
// only works when there is no task running
// because we have a server always listening port, this handler will NEVER execute
process.on("beforeExit", (code) => {
console.log("Process beforeExit event with code: ", code);
});
// only works when the process normally exits
// on windows, ctrl-c will not trigger this handler (it is unnormal)
// unless you listen on 'SIGINT'
process.on("exit", (code) => {
@penn201500
penn201500 / switch.el
Last active January 11, 2025 03:06 — forked from celadevra/switch.el
Sane switching of input methods when using evil-mode in Emacs on OSX๏ผ›change some conf for qwerty keyboard, and default-im keyboard changed to be self-conf.
;; switch to english input method when switching to normal mode
;; and switch back when entering insert/replace modes
;; need external script support, currently mac-only
(defvar default-im "org.unknown.keylayout.layoutformc" "Default ascii-only input method")
(defvar prev-im (substring (shell-command-to-string "/usr/local/bin/im-select") 0 -1)
"IM that I use when starting Emacs and exiting insert mode")
(defun im-use-english ()
"Switch to english input method on a Mac. im-select is a tool
provided at https://github.com/daipeihust/im-select"