Skip to content

Instantly share code, notes, and snippets.

View veryjos's full-sized avatar
:octocat:
🤠 haha okay haha 🤠

veryjos veryjos

:octocat:
🤠 haha okay haha 🤠
View GitHub Profile
#include <cstdio>
#include "MetaPlug/generated/MetaPlug.hpp"
#include "main.hpp"
int main(int argc, char** argv) {
auto metaclass = CppMetaGen::GetMetaClassByName("TestClass");
auto obj = new TestClass();
obj->someField = 23;
@veryjos
veryjos / gist:8d6649e6fd24b482757b9a12d38aa4cc
Created August 19, 2017 02:07
legacy currychakra example
#include "CC_Config.hpp"
using namespace CurryChakra;
// Shims for JS types
// JsValueRef
JsValueRef CppToJs(JsValueRef& value) {
@veryjos
veryjos / Output
Last active August 19, 2017 20:50
Native method PrintSelf() called
13.500000
2.500000
Result -> 13.5
test: 1.000000
#include "main.hpp"
int main() {
const char* script = R"(
(
() => {
class Extended extends CppClass {
constructor() {
super(10, 10);
}
abstract class TestParentClass {
abstract Test(): string;
}
class TestConcreteA {
Test() {
return "Called ConcreteA.Test()";
}
}
interface State {
DoThing(): void;
}
class StandState implements State {
DoThing() {
console.log("Doing stand thing");
}
}
#include "Project_Combo.h"
#include "GCAdapter.h"
#define ADAPTER_VENDOR_ID 0x057e
#define ADAPTER_PRODUCT_ID 0x0337
GCAdapter::GCAdapter() {
// Clear controller plugged states
for (int i = 0; i < 4; i++) {
controllers[i].connected = GCPadState::STATE_NONE;
Print
/
Add
/ \
1 4
Start at print node, postorder traversal:
| Node: Print
@veryjos
veryjos / output
Last active November 28, 2017 03:42
Success #stdin #stdout 0s 16072KB
76
69
FooBar
hey
there bud
#pragma once
#include <string>
#include <functional>
#include <unordered_map>
template <typename T>
struct AutoPropMeta {
static AutoPropMeta<T>* GetInstance() {
static bool first = true;