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
let s:root_dir = expand("<sfile>:p:h") | |
let g:marching_include_paths = [ | |
\ s:root_dir . "/deps/cocos2d-x/cocos", | |
\ s:root_dir . "/deps/cocos2d-x/cocos/platform", | |
\ s:root_dir . "/deps/cocos2d-x/cocos/platform/apple", | |
\ s:root_dir . "/deps/cocos2d-x/cocos/platform/desktop", | |
\ s:root_dir . "/deps/cocos2d-x/cocos/platform/mac", | |
\ s:root_dir . "/deps/cocos2d-x/external/glfw3/include/mac", | |
\ s:root_dir . "/deps/cocos-ui/include", | |
\ s:root_dir . "/deps/clay/include", |
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
# redis | |
redis: | |
image: redis | |
expose: | |
- "6379" | |
# hubot | |
hubot: | |
build: . | |
links: | |
- redis:redis |
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 "HelloWorldScene.h" | |
USING_NS_CC; | |
cocos2d::allocator::AllocatorStrategyPool<HelloWorld> HelloWorld::allocator_pool{"HelloWorldPool"}; | |
Scene* HelloWorld::createScene() | |
{ | |
auto scene = Scene::create(); | |
auto layer = HelloWorld::create(); |
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
CXX = clang++ | |
CFLAGS = -I/usr/local/include | |
LDFLAGS = -framework OpenGL -L/usr/local/lib -lglfw | |
a.out: sample.cpp | |
$(CXX) $(CFLAGS) sample.cpp $(LDFLAGS) |
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 <GLFW/glfw3.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
static void error_callback(int error, const char* description) | |
{ | |
fputs(description, stderr); | |
} | |
static void key_callback(GLFWwindow* window, int key, int scancode, int action, |
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
cmake_minimum_required(VERSION 2.8) | |
add_definitions("-Wall -std=c++11") | |
add_library(json11 STATIC json11.cpp) | |
install(TARGETS json11 ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) | |
install(FILES json11.hpp DESTINATION include) |
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 <iostream> | |
#include <vector> | |
static void print_vector(const std::vector<int>& v) | |
{ | |
std::cout << "----- vector start -----" << std::endl; | |
for(const auto& i : v) | |
{ | |
std::cout << i << " "; | |
} |
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 <iostream> | |
#include <vector> | |
int main() | |
{ | |
std::vector<int> v{1, 2, 3, 4, 5, 6}; | |
int target = 5; | |
auto it = std::find(v.begin(), v.end(), target); | |
bool flag = it != v.end(); |
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 <fstream> | |
#include <iostream> | |
#include <mutex> | |
#include <string> | |
#include <thread> | |
#include <restclient-cpp/restclient.h> | |
#include <json11.hpp> |
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 <iostream> | |
#include <restclient-cpp/restclient.h> | |
static std::string test_url = "http://www.google.com"; | |
int main() | |
{ | |
auto res = RestClient::get(test_url); | |
std::cout << "# Code" << std::endl; |