Pinned ·

GitHub Actions: How to Implement Caching For Releases (Rust as Example)

tl;dr: Please find a working reference implementation on GitHub. Update: I turned the example below into a GitHub Action, available at hendrikmaus/custom-cache-action. If you are reading this at a later point in time, GitHub might have delivered this feature. Context As of toda…

Pinned ·

Rust: Render `serde` Errors For Humans Using `format_serde_error`

Foreword The serde crate is certainly one of the finest tools in the box. I rarely work on a project that does not make use of it; most of the time it is a user-facing usage - prominently: configuration files. Now, humans make mistakes, and I think software should be blameless an…

Pinned ·

Rust: How to Unwrap Multiple Required Options

Let's say we have a function that returns an Option. fn get_option() -> Option<bool> { Some(true) } We call it in main for this example and print the value using the dbg! macro: fn main() { let b = get_option(); dbg!(b); } This will yield: [src/main.rs:7…

Pinned ·

How to Update NixOS

I recently wrote a post called How to Setup NixOS on a Raspberry Pi and haven't touched the system I setup there in a little while. Now I booted it back up and found that there has been a new release of NixOS in the meantime. So here is a quick how-to on updating NixOS: Login a…

Pinned ·

How to Use Your Android Device as Webcam on Linux

I love to work from home. And I like my workspace to be ergonomic as well. Ergonomics at the workplace is usually something you do for yourself, however recently I did some improvements for everybody who interacts with me in order to improve their experience as much as I can from…