Skip to content

Instantly share code, notes, and snippets.

@rctlmk
rctlmk / Cargo.toml
Created April 21, 2023 23:37
SplitPane
[dependencies]
egui = "0.21"
egui_extras = "0.21"
eframe = "0.21"
@anntzer
anntzer / enum.h
Created December 8, 2020 21:25
pythonic enums with pybind11
// The ``P11X_DECLARE_ENUM`` macro and the ``p11x::bind_enums`` function
// bind enums to Python's ``enum.Enum`` or one of its subclasses
// (``enum.IntEnum``, ``enum.Flag``, ``enum.IntFlag``) -- unlike
// ``pybind11::enum_`` which uses an unrelated implementation.
//
// Use as follows:
//
// .. code-block:: c++
//
// // Define module_name.NameOfPythonEnum as an enum.Enum subclass, with
@mariocj89
mariocj89 / python-logging.md
Last active April 13, 2024 13:15
Understanding logging in Python

Logging trees

Introduction

When applications are running in production, they become black boxes that need to be traced and monitored. One of the simplest, yet main, ways to do so is logging. Logging allows us - at the time we develop our software - to instruct the program to emit information while the system is running that will be useful for us and our sysadmins.

@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm