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
| " setup for Vundle | |
| set nocompatible | |
| filetype off | |
| " set the runtime path to include Vundle and initialize | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| call vundle#begin() | |
| " let Vundle manage Vundle, required | |
| Plugin 'VundleVim/Vundle.vim' | |
| Plugin 'rust-lang/rust.vim' | |
| Plugin 'cespare/vim-toml' |
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 <type_traits> | |
| #include <tuple> | |
| #include <utility> | |
| // Expand type_traits to check is a type is a template specialization | |
| template <template <class...> class Template, class T > | |
| struct is_specialization_of : std::false_type {}; | |
| template <template <class...> class Template, class... Args > | |
| struct is_specialization_of<Template, Template<Args...>> : std::true_type {}; |
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 <type_traits> | |
| #include <utility> | |
| #include <iostream> | |
| #include <memory> | |
| #include <string> | |
| #include <algorithm> | |
| #include <stdexcept> | |
| #include <limits> | |
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
| #pragma once | |
| #include "async/future.hpp" | |
| #include "compat/asio.h" | |
| #include "message.h" | |
| #include <iostream> | |
| #include <memory> | |
| #include <sstream> | |
| #include <string> |
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
| build --symlink_prefix='out/' | |
| build --experimental_no_product_name_out_symlink |
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 <array> | |
| #include <cstdio> | |
| #include <cstdlib> | |
| #include <iostream> | |
| #include <new> | |
| #include <sstream> | |
| #include <vector> | |
| namespace { |
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 <class...> | |
| using void_t = void; | |
| template <class Transform, class Arg, class = void> | |
| struct transform_takes_one_arg : std::false_type {}; | |
| template <class Transform, class Arg> | |
| struct transform_takes_one_arg<Transform, | |
| Arg, | |
| void_t<decltype(std::declval<Transform>()(std::declval<Arg>()))>> |
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
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """Determine rough estimates for material requirements.""" | |
| from dataclasses import dataclass | |
| from sympy import Symbol | |
| @dataclass | |
| class Body: | |
| width: Symbol |
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 <type_traits> | |
| /// @brief Determines of a type is a specialization of a template | |
| /// @see wg21.link/p2098 | |
| ///@{ | |
| template <class T, template <class...> class Primary> | |
| struct is_specialization_of : std::false_type {}; | |
| template <template <class...> class Primary, class... Args> | |
| struct is_specialization_of<Primary<Args...>, Primary> : std::true_type {}; |
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
| #!/usr/bin/env bash | |
| echo "" | |
| echo -e " \033[38;5;231m System colors:\033[m" | |
| for r in {0..2}; do | |
| for i in {0..15}; do | |
| if [[ "$r" == "1" ]]; then | |
| if [[ $i -gt 1 && $i -ne 4 ]]; then printf "\033[38;5;16m"; fi | |
| printf "\033[48;5;${i}m %03d \033[m " $i | |
| else |