Skip to content

Instantly share code, notes, and snippets.

Avatar

Lilith PrincessRTFM

View GitHub Profile
@coolreader18
coolreader18 / segfault.py
Last active December 12, 2022 08:42
CPython segfault in 5 lines of code
View segfault.py
class E(BaseException):
def __new__(cls, *args, **kwargs):
return cls
def a(): yield
a().throw(E)
@fearphage
fearphage / .gitconfig
Last active November 26, 2018 15:13
When you need to save the code before you save yourself, git fire.
View .gitconfig
[alias]
fire = !"f() { \
local current_branch=$(basename \"$(git symbolic-ref HEAD)\"); \
local new_branch=fire-${current_branch}-$(git config user.email)-$(date +%s) \
local message; \
if [ -z \"$1\" ]; then \
message=\"fire commit from $current_branch\"; \
else \
message=\"$*\"; \
fi; \