Skip to content

Instantly share code, notes, and snippets.

View SuperThinking's full-sized avatar
🥔
Potato Potato

Vishal Dhawan SuperThinking

🥔
Potato Potato
View GitHub Profile
@SuperThinking
SuperThinking / .zshrc
Last active June 17, 2025 03:17
Quickly kill the last running process (ctrl+z ctrl+k)
# ctrl+z ctrl+k
kill-last-process() {
kill -9 %%
zle reset-prompt
}
zle -N kill-last-process
bindkey '^k' kill-last-process
@SuperThinking
SuperThinking / register_handler.py
Created August 7, 2024 11:12
[Hack] Registering multiple signal handlers for a single event in python
import signal
def proxy_handler(funcs):
def x(a, b):
for func in funcs:
func(a, b)
return x
def register_signal_handler(sig, handler):
l = [handler]