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
#pragma once | |
#include <algorithm> | |
#include <cassert> | |
#include <cstddef> | |
#include <cstdint> | |
#include <numeric> | |
#include <utility> | |
#include <vector> | |
/** |
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
#!/usr/bin/env bash | |
# Dir of the script | |
readonly script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd - P)" | |
readonly dist_dir="${script_dir}/../dist" | |
# Source common options to tweak the script | |
user_config_file="${script_dir}/foo-buildenv.conf" | |
if [[ -f "${user_config_file}" ]]; then | |
source "${user_config_file}" |
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 <string_view> | |
#include <pal/core/cast.hpp> | |
#include <pal/core/print-helpers.hpp> | |
#include <pal/core/container/container.hpp> | |
#include "tcp-reader.hpp" | |
namespace pal::tcp { | |
Reader::Reader(const std::string &name, Config conf) | |
: m_logger{log::get(name)} |
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
#pragma once | |
#include <condition_variable> | |
#include <functional> | |
#include <mutex> | |
#include <thread> | |
#include <asio.hpp> | |
#include <asio/signal_set.hpp> | |
namespace system { |
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
#pragma once | |
#include <algorithm> | |
#include <functional> | |
#include <vector> | |
namespace pal { | |
template <typename Key, | |
typename Compare = std::less<Key>, | |
typename Allocator = std::allocator<Key>> |
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
// state machine that handes processing of data | |
struct Fetch {}; | |
struct Stop {}; | |
struct StartProcessing { | |
SamplePtr sample; | |
}; | |
struct WaitProcessed { | |
SamplePtr sample; | |
std::string json_path; | |
}; |
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
#!/bin/bash | |
# This script creates a Preseeded Debian buster ISO installer. | |
# The preseeded file must have been filled beforehand. | |
debian_iso_url="https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-10.4.0-amd64-netinst.iso" | |
debian_preseed_cfg="$(dirname "$0")/debian-buster-preseed.cfg" | |
debian_iso_file="$(basename ${debian_iso_url})" | |
debian_iso_preseeded="preseeded-${debian_iso_file}" |
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
#!/usr/bin/env sh | |
# destination directory | |
DIR=/home/pal/code/deps/clang | |
# clang as default compiler | |
CC=clang CXX=clang++ \ | |
PORTAGE_TMPDIR=$DIR/var/tmp \ | |
EMERGE_LOGDIR=$DIR/var/log \ | |
PORT_LOGDIR=$DIR/var/log/portage \ |