Skip to content

Instantly share code, notes, and snippets.

Sysroot

Choosing a Linux distribution for a development sysroot.

Distribution Release Support Extended Linux GNU libc
Debian 8 (Jessie) 2015-04-25 2020-06-30 2025-06-30 3.16 2.19
Debian 9 (Stretch) 2017-07-17 2022-06-30 2027-06-30 4.9 2.24
Debian 10 (Buster) 2019-06-06 2024-06-30 2029-06-30 4.19 2.28
Debian 11 (Bullseye) 2021-08-14 2026-06-30 2031-06-30 5.10 2.31
Debian 12 (Bookworm) 2023-06-10 2028-06-30 2033-06-30 6.1 2.36
// This is a random access iterator similar to boost::counting_iterator for use with
// parallel algorithms. It's probably not necessary to have random access or overflow
// checking. More testing needed, but useful as a snippet.
#include <compare>
#include <concepts>
#include <exception>
#include <iterator>
#include <cstddef>
#include <fmt/format.h>
#include <range/v3/view.hpp>
#include <vector>
struct event {
int created = 0;
int status = 0;
};
std::vector<event> create_events() {
// https://en.cppreference.com/w/cpp/thread/shared_mutex
// https://godbolt.org/z/eoqErv
#include <iostream>
#include <shared_mutex>
#include <thread>
#include <vector>
int g_value = 0;
std::shared_mutex g_mutex;
@qis
qis / office.md
Last active November 7, 2024 12:17
Microsoft Office

Microsoft Office

Install Microsoft Office and Language Packs.

General
+ Privacy Settings
  [Privacy Settings...]
  + Optional diagnostic data
    ☐ Send additional diagnostic and usage data to Microsoft
  + Connected experiences
@qis
qis / components.cpp
Last active November 27, 2020 17:58
C++ component system with a singleton registry.
// ============================================================================
// component.hpp
// ============================================================================
#pragma once
#include <typeindex>
#include <cstddef>
class component_manager {
template <typename T>
friend class component;
file(MAKE_DIRECTORY
${CMAKE_CURRENT_BINARY_DIR}/data
${CMAKE_CURRENT_BINARY_DIR}/temp)
add_executable(icupkg src/source/tools/icupkg/icupkg.cpp)
target_compile_options(icupkg PRIVATE ${compile_options})
target_compile_definitions(icupkg PRIVATE ${compile_definitions})
target_link_libraries(icupkg PRIVATE dt_stub uc in io tu)
add_custom_target(data ALL DEPENDS icupkg COMMAND $<TARGET_FILE:icupkg>
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
project(icu VERSION 68.1 LANGUAGES C CXX)
# Library: icudt
file(GLOB dt_sources src/source/stubdata/*.cpp)
add_library(dt SHARED ${headers} ${dt_sources})
set_target_properties(dt PROPERTIES OUTPUT_NAME "icudt" INSTALL_RPATH "$ORIGIN")
# Library: icuuc
file(GLOB uc_sources src/source/common/*.cpp)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
project(icu VERSION 68.1 LANGUAGES C CXX)
#set(ICU_VER "${PROJECT_VERSION_MAJOR}-${PROJECT_VERSION_MINOR}")
#set(ICU_URL "https://github.com/unicode-org/icu/archive/release-${ICU_VER}.tar.gz")
#set(ICU_SHA "5b3cfb519c20511c1c0429b093ec16960f6a6a0d7968a9065fda393f9eba48fc")
#download(${ICU_URL} ${ICU_SHA} src)
set(ICU_DIR "release-${PROJECT_VERSION_MAJOR}-${PROJECT_VERSION_MINOR}")
set(ICU_TAR "icu4c-${PROJECT_VERSION_MAJOR}_${PROJECT_VERSION_MINOR}-src.tgz")
#include <windows.h>
#include <filesystem>
#include <iostream>
#include <sstream>
#include <string>
int main(int argc, char* argv[]) {
// Report command and parameter lengths.
if (argc > 1) {
std::cout