Skip to content

Instantly share code, notes, and snippets.

View LostMyselfInTheNowhere's full-sized avatar
🌀
Never give up.

Lost Myself In The Nowhere LostMyselfInTheNowhere

🌀
Never give up.
View GitHub Profile
@LostMyselfInTheNowhere
LostMyselfInTheNowhere / shell_c.c
Last active February 24, 2024 16:08
Shell stub for C, makes the source file compile itself just by running it (C/Bash polyglot)
#define SHELL_STUB /*
CC="gcc"; "$CC" -o "$0.elf" "$0"; ./"$0.elf"; rm -rf "$0.elf"; exit
*/
#include <stdio.h>
int main(void) {
printf("Hello! ^w^\n");
return 0;