git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
Handles = {} | |
local memoizedFuncs = {} | |
-- metatable which does magic | |
local mt = {} | |
mt.__index = function(handle, key) | |
if not handle.isValid then | |
print(debug.traceback()) | |
error("Error: handle is not valid!", 2) | |
end |
template <typename ...> class ActionEvent; | |
template <typename CT> | |
class ActionEvent <CT> { | |
public: | |
class Sink { | |
typedef void* InstancePtr; |
function clone (t) -- deep-copy a table | |
if type(t) ~= "table" then return t end | |
local meta = getmetatable(t) | |
local target = {} | |
for k, v in pairs(t) do | |
if type(v) == "table" then | |
target[k] = clone(v) | |
else | |
target[k] = v | |
end |
--[[ deepcopy.lua | |
Deep-copy function for Lua - v0.2 | |
============================== | |
- Does not overflow the stack. | |
- Maintains cyclic-references | |
- Copies metatables | |
- Maintains common upvalues between copied functions (for Lua 5.2 only) | |
TODO |
#!/usr/bin/env bash | |
if [ $1 = "C" ] | |
then | |
/usr/bin/clang -ggdb main.c -std=c99 -Wall -Werror -o program && /usr/local/bin/valgrind ./program | |
elif [ $1 = "Cpp" ] | |
then | |
/usr/bin/clang++ -std=c++11 -stdlib=libc++ main.cc -Wall -Werror -o program && /usr/local/bin/valgrind ./program | |
fi |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
# - Find libbson | |
# Find the native libbson includes and library. | |
# Once done this will define | |
# | |
# LIBBSON_INCLUDE_DIRS - where to find bson.h, etc. | |
# LIBBSON_LIBRARIES - List of libraries when using libbson. | |
# LIBBSON_FOUND - True if libbson found. | |
# | |
# LIBBSON_VERSION_STRING - The version of libbson found (x.y.z) | |
# LIBBSON_VERSION_MAJOR - The major version |
# - Check for the presence of RapidJSON | |
# | |
# The following variables are set when RAPIDJSON is found: | |
# RAPIDJSON_FOUND Set to true, if all components of RapidJSON | |
# have been found. | |
# RAPIDJSON_INCLUDE_DIRS Include path for the header files of RAPIDJSON | |
# RAPIDJSON_LIBRARIES Link these to use RAPIDJSON | |
# RAPIDJSON_LFLAGS Linker flags (optional) | |
if (NOT RAPIDJSON_FOUND) |
# - Check for the presence of cpp_redis | |
# | |
# The following variables are set when cpp_redis is found: | |
# CPPREDIS_FOUND Set to true, if all components of cpp_redis | |
# have been found. | |
# CPPREDIS_INCLUDE_DIRS Include path for the header files of cpp_redis | |
# CPPREDIS_LIBRARIES Link these to use cpp_redis | |
# CPPREDIS_LFLAGS Linker flags(optional) | |
# Define the list of search paths for headers and libraries |