Skip to content

Instantly share code, notes, and snippets.

View szhu's full-sized avatar

Sean Zhu szhu

  • NYC / SF
  • 22:00 (UTC -04:00)
  • X @sfzhu
View GitHub Profile
@szhu
szhu / selfcompile.m
Last active May 14, 2018 18:27 — forked from n-b/selfcompile.m
A simple self-compiling objective-c file
/* 2>/dev/null
COMPILED=${0%.*}
[[ -e "$COMPILED" ]] || clang $0 -o "$COMPILED" -framework Foundation
exec "$COMPILED" $@
*/
#import <Foundation/Foundation.h>
int main(int argc, char *argv[])