This file contains hidden or 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
#!/usr/bin/env python | |
# Original work by Rowan James at https://gist.github.com/rowanj/5475988 | |
# This is free and unencumbered software released into the public domain. | |
# http://unlicense.org | |
import argparse | |
import subprocess | |
import os | |
import glob |
This file contains hidden or 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 "Bind.hpp" | |
namespace OTR | |
{ | |
template <typename Object> | |
int objectID(Object const& object) | |
{ | |
return reinterpret_cast<intptr_t>(&object); | |
} | |
template <typename Sig, typename Func> |
This file contains hidden or 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
local xcCLANG = [ SHELL "xcrun -sdk iphoneos -f clang" ] ; | |
local CLANG = [ MATCH "([^ | |
]*)" : $(xcCLANG) ] ; | |
ECHO "CLANG = $(CLANG)" ; | |
local xcDEVDIR = [ SHELL "xcode-select --print-path" ] ; | |
local DEVDIR = [ MATCH "([^ | |
]*)" : $(xcDEVDIR) ] ; | |
ECHO "DEVDIR = $(DEVDIR)" ; |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="initial-scale=1"> | |
<title></title> | |
<meta name="notebook-annotation-version" content="2"> | |
<style type="text/css">.page { | |
/* PAGE BACKGROUND */ | |
background: white; | |
This file contains hidden or 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 <iostream> | |
using namespace std; | |
// #include <some header> | |
void foo(int x, int y); | |
// but we always use y = 2 with foo | |
void foo(int x, int y = 2); | |
int main() |
This file contains hidden or 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
struct Base{virtual ~Base(){}; int x;}; | |
struct Derived : public Base {int y;}; | |
#import <boost/pool/pool_alloc.hpp> | |
template <typename T> | |
T* construct() | |
{ | |
T* result = reinterpret_cast<T*>(boost::pool_allocator<Base>::pool_allocator::allocate(sizeof (T))); |
This file contains hidden or 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
struct Base{virtual ~Base(){}; int x;}; | |
struct Derived : public Base {int y;}; | |
#import <boost/pool/object_pool.hpp> | |
namespace pools | |
{ | |
boost::object_pool<Base> Base; | |
boost::object_pool<Derived> Derived; | |
} |
This file contains hidden or 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
// istreamLikeClass is | |
boost::iostreams::filtering_streambuf<boost::iostreams::input> in; | |
boost::iostreams::gzip_decompressor decompressor; | |
in.push(decompressor); | |
in.push(is); | |
stringstream ss (stringstream::in | stringstream::out); |
This file contains hidden or 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
#import <iostream> | |
struct Octree { | |
Octree() : index(created++){} | |
void print_index() | |
{ | |
std::cout << "print_index() " << index << std::endl; | |
} | |
int index; | |
static int created; |