clang++ -isysroot `xcrun --show-sdk-path` -o blah.out blah.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Play with ?ts=<N> in the URL to see the effects of tabs vs spaces. | |
#define $ /* this macro is purposely blank as a countermeasure to editors that don't support mixed leading tabs/spaces */ | |
switch( v ) { | |
case A, B: | |
$ C, D: | |
// ... code ... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* read a string from a program's output */ | |
char *mk_com_readprogf(const char *format, ...) { | |
static char cmd[32768]; | |
static char buf[4096]; | |
static char *out = NULL; | |
size_t n = 0, m = 0; | |
FILE *fp = (FILE *)0; | |
va_list args; | |
va_start(args, format); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <assert.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <new> | |
#include <thread> | |
#include <atomic> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
*/ | |
/* | |
*/ //========================================// | |
/* // TILE - MINI-ENGINE (TEST) // Tile-1 | |
*/ // (C) Aaron J. Miller, 2012 // GPLv3 | |
/* //========================================// | |
*/ | |
/* | |
*/ //this software comes with absolutely no warranty// |
This is a document detailing the planned approach for a rendering system I intend to implement, the reasons driving the approach, and the general rationale for the new design.
If you're interested in rendering APIs and want to look at different approaches, this document might be for you. I'm not claiming to be an expert in any field, especially not one as diverse and dynamic as rendering approaches, so treat everything here like I'm building a wall to keep good technology out and making you pay for it. In other words, consider whether better ways might exist and whether either of us are biased toward something.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lsof | grep "name of file" | egrep -v "COMMAND PID USER" | awk '${print $2}' | sort -n | uniq | xargs kill -9 |