Skip to content

Instantly share code, notes, and snippets.

@sakrist
Forked from n-b/selfcompile.m
Created April 11, 2013 10:42
Show Gist options
  • Save sakrist/5362402 to your computer and use it in GitHub Desktop.
Save sakrist/5362402 to your computer and use it in GitHub Desktop.
/*/../bin/ls > /dev/null
COMPILED=${0%.*}
clang $0 -o $COMPILED -framework Foundation;
$COMPILED; rm $COMPILED; exit;
*/
#import <Foundation/Foundation.h>
int main(int argc, char *argv[])
{
@autoreleasepool
{
NSLog(@"Hello %@",NSProcessInfo.processInfo.environment[@"USER"]);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment