View NamedTuple.h
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
// Named tuple for C++ | |
// Example code from http://vitiy.info/ | |
// Written by Victor Laskin (victor.laskin@gmail.com) | |
// Parts of code were taken from: https://gist.github.com/Manu343726/081512c43814d098fe4b | |
namespace foonathan { | |
namespace string_id { | |
namespace detail | |
{ |
View Dockerfile
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
# THIS DOCKERFILE TRIES TO COMPILE CURL/OPENSSL FOR ANDROID | |
# | |
# 5 july 2015 | |
# | |
# More detals could be found here: | |
# http://vitiy.info/dockerfile-example-to-compile-libcurl-for-android-inside-docker-container/ | |
FROM ubuntu | |
MAINTAINER Victor Laskin "victor.laskin@gmail.com" |
View aop.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
// This is example from | |
// http://vitiy.info/c11-functional-decomposition-easy-way-to-do-aop/ | |
// by Victor Laskin | |
#include <iostream> | |
#include <functional> | |
#include <map> | |
#include <vector> | |
#include <memory> | |
#include <chrono> |
View fn_universal.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
// Templates as first-class citizens in C++11 | |
// Example code from http://vitiy.info/templates-as-first-class-citizens-in-cpp11/ | |
// Written by Victor Laskin (victor.laskin@gmail.com) | |
#include <iostream> | |
#include <algorithm> | |
#include <functional> | |
#include <vector> | |
#include <tuple> |
View Dockerfile
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
# THIS DOCKERFILE TRIES TO COMPILE CURL FOR ANDROID x86 ARCH | |
# Description - http://vitiy.info/dockerfile-example-to-compile-libcurl-for-android-inside-docker-container/ | |
FROM ubuntu | |
MAINTAINER Victor Laskin "victor.laskin@gmail.com" | |
# Install compilation tools | |
RUN apt-get update && apt-get install -y \ |
View listcompr.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
// List comprehension in C++11 in form of SQL-like syntax | |
// Example code from http://vitiy.info/cpp11-writing-list-comprehension-in-form-of-sql/ | |
// Written by Victor Laskin (victor.laskin@gmail.com) | |
#include <iostream> | |
#include <functional> | |
#include <vector> | |
#include <future> | |
#include <algorithm> | |
using namespace std; |
View Declaration.h
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
// Immutable serialisable data structures in C++11 | |
// Example code from http://vitiy.info/immutable-data-and-serialisation-in-cpp11/ | |
// Written by Victor Laskin (victor.laskin@gmail.com) | |
class ScheduleItemData : public IImmutable { | |
public: | |
const time_t start; | |
const time_t finish; | |
SERIALIZE_JSON(ScheduleItemData, start, finish); | |
}; |
View MVJSON.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
/* | |
* | |
* Compact JSON format parsing lib (native cross-platform c++) | |
* | |
* Copyright (C) 2013 Victor Laskin (victor.laskin@gmail.com) | |
* Details: http://vitiy.info/?p=102 | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions | |
* are met: |
View Dockerfile
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
# Dockerfile for COMPILATION C++ into JS using EMSCRIPTEN | |
FROM stackbrew/ubuntu:saucy | |
MAINTAINER "Victor Laskin" | |
RUN apt-get update | |
RUN apt-get install -y --no-install-recommends \ | |
wget curl apache2 \ | |
ca-certificates git build-essential make cmake scons \ | |
python nodejs default-jre-headless clang-3.4 llvm-3.4 |