Hacker Newsnew | past | comments | ask | show | jobs | submit | dennydai's commentslogin

Just use shebang

https://news.ycombinator.com/item?id=38987109

#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"


That's bat guano insane, but I still like it more than TFA.


It's not that crazy. Another fun use is with a `uv run` shebang https://news.ycombinator.com/item?id=42855258


Note to others who might like to write long shebangs: the -S argument there to /usr/bin/env is load-bearing, and if you forget it weird stuff will happen, at least on most Linux systems. I wrote about it a few years ago, based on a true story. https://crystae.net/posts/two-shebang-papercuts/


Thanks for your interest! The key difference is that Patcherex2 was designed from the ground up to be a highly modular binary patching framework. This makes it much easier to add support for new architectures and maintain compared to the original Patcherex, as many components can be shared across different targets, and patch implementations are mostly target-agnostic.

For more details, please check out our latest documentation: https://purseclab.github.io/Patcherex2 https://purseclab.github.io/Patcherex2/core_ideas/patches/ https://purseclab.github.io/Patcherex2/advanced_usages/add_n...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: