Skip to content

Instantly share code, notes, and snippets.

@jeremyBanks
Created September 14, 2008 18:55
Show Gist options
  • Save jeremyBanks/10749 to your computer and use it in GitHub Desktop.
Save jeremyBanks/10749 to your computer and use it in GitHub Desktop.
[2010-01] my basic textmate templates for c and python
//&>/dev/null;x="\${0%.*}";[ ! "\$x" -ot "\$0" ]||(rm -f "\$x";cc -o "\$x" "\$0")&&"\$x" \$*;exit
#import <stdio.h>
int main(int argc, char* argv[]) {
${1:printf("${2:Hello, world!}\n"$3);}
return 0;
}
#!/usr/bin/env python
# encoding: utf-8
from __future__ import division, with_statement
import sys
def main(*args):
${1:print "${2:Hello, world!}"}
if __name__ == "__main__": sys.exit(main(*sys.argv[1:]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment