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
<html> | |
<head> | |
</head> | |
<body> | |
<script> | |
// connect | |
var socket = new WebSocket("ws://127.0.0.1:8080"); | |
socket.onopen = function(event) { |
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
# TODO use in house docker images for compilers | |
FROM ricejasonf/clang | |
WORKDIR /usr/local/src | |
# asio | |
RUN git clone https://github.com/chriskohlhoff/asio.git \ | |
&& cd asio/asio \ | |
&& ./autogen.sh \ | |
&& ./configure --prefix=/usr/local --without-boost \ | |
CXXFLAGS="-stdlib=libc++" LDFLAGS="-stdlib=libc++ -lc++abi" \ |
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
cmake_minimum_required(VERSION 3.5) | |
add_definitions(-std=c++1z) | |
add_definitions(-DBOOST_HANA_CONFIG_ENABLE_STRING_UDL) | |
add_definitions(-ftemplate-backtrace-limit=0) | |
add_definitions(-Wall) | |
add_definitions(-Wextra) | |
include("/opt/metabench.cmake") |
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 <boost/fit/fold.hpp> | |
#include <boost/fit/alias.hpp> | |
#include <iostream> | |
#include <string> | |
namespace fit = boost::fit; | |
struct my_string_tag { }; | |
using my_string = fit::alias_inherit<std::string, my_string_tag>; |
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
if (typeof my_reset != "undefined") my_reset(); | |
my_init = function() { | |
old_redraw = redraw; | |
var mag = 0.1; | |
var c_ang = 0; | |
var get_ang = function(snake_ang) { | |
var diff = Math.abs(snake_ang - c_ang); | |
if (diff < mag) return snake_ang; | |
else if ((c_ang < snake_ang && snake_ang - c_ang < Math.PI) | |
|| (c_ang > snake_ang && c_ang - snake_ang > Math.PI)) |
OlderNewer