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)) |
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
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
# 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
<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
{ | |
"name": "pivotal-tools", | |
"version": "1.0.0", | |
"description": "", | |
"main": "weekly_plan.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "Jason Rice", | |
"license": "ISC", |
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 <string> | |
#include <type_traits> | |
#include <utility> | |
struct my_empty { }; | |
using storage = std::aligned_union_t<sizeof(my_empty), my_empty, std::string>; | |
int main() | |
{ |
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
template <int v> | |
struct int_c { static constexpr int value = v; }; | |
struct a_tag { }; | |
struct b_tag { }; | |
template <bool cond> | |
struct c_tag | |
{ | |
static_assert(cond); | |
}; |
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/hana.hpp> | |
namespace hana = boost::hana; | |
struct a_tag { }; | |
struct b_tag { }; | |
template <typename T> | |
constexpr auto get(T) | |
{ |
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<iostream> | |
struct tag1 { }; | |
struct tag2 { }; | |
struct tag3 { }; | |
struct tag4 { }; | |
template <typename Tag> | |
struct foo_impl { }; |
NewerOlder