Skip to content

Instantly share code, notes, and snippets.

@1we13145s
1we13145s / Instructions.md
Created October 3, 2025 11:32 — forked from lbssousa/Instructions.md
VSCode + Dev Containers and Toolbx/Distrobox setup for Fedora Silverblue

VSCode + Dev Containers and Toolbx/Distrobox setup for Fedora Silverblue

PLEASE NOTE:

I personally don't use Flatpak VSCode anymore, since I switched from Fedora Silverblue to Universal Blue's project Bluefin-DX. I'll leave the instructions here for those who want them, but be aware that Flatpak VSCode instructions won't be maintained anymore.

Steps

If you prefer VSCode Flatpak

  1. Install VSCode Flatpak from Flathub:
@1we13145s
1we13145s / result-example.cpp
Created May 4, 2025 08:02 — forked from ugovaretto/result-example.cpp
Rust-style C++ Result implementation, supporting references
// Implementation of Result<Result,Error> type a la Rust.
// author: Ugo Varetto
// License: Zero-clause BSD
// SPDX identifier: 0BSD
#include "result.h"
//-----------------------------------------------------------------------------
Result<int, std::string> Foo(int i) {
if (i == 0) {
return Err(std::string("Error"));
} else {
@1we13145s
1we13145s / .clang-format
Created May 4, 2025 08:01 — forked from YodaEmbedding/.clang-format
.clang-format for Rust style (rustfmt)
AccessModifierOffset: -2
AlignAfterOpenBracket: BlockIndent # New in v14. For earlier clang-format versions, use AlwaysBreak instead.
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: DontAlign
AlignOperands: false
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
@1we13145s
1we13145s / queue.hpp
Created March 31, 2025 07:43 — forked from Kuxe/queue.hpp
C++ implementation of a general semaphore and a thread-safe circular queue. I recommend refitting the queue class with the standard semaphore available in <semaphore> if you can use C++20.
#ifndef QUEUE_HPP
#define QUEUE_HPP
#include <cstdio>
#include "semaphore.hpp"
/** A thread-safe queue which supports one read-thread and one write-thread
manipulating the queue concurrently. In other words, the thread-safe queue can
be used in the consumer-producer problem with one consumer and one producer. **/
template<typename T>