Skip to content

Instantly share code, notes, and snippets.

@pcdavid
Created July 18, 2009 12:56
Show Gist options
  • Save pcdavid/149544 to your computer and use it in GitHub Desktop.
Save pcdavid/149544 to your computer and use it in GitHub Desktop.
self.c
#include <string.h>
int main() { char *self = "\"#include <string.h>\nint main() { char *self=%s; char *format = strdup(self+1); format[strlen(format)-2] = 0; print(format, self); return 0;}\""; char *format = strdup(self+1); format[strlen(format)-2] = 0; printf(format, self); return 0;}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment