dystroy|Canop / blog

From Terminator To Wezterm

7 minute read Published: 2023-11-17

This post doesn't compare Terminator and Wezterm. This is the help I would have loved to find when starting to try Wezterm coming from Terminator.

A Kind Introduction

7 minute read Published: 2023-11-15

How to leverage the Rust compiler to prevent identifier misuse ?

How to go from ec2ba151-7acf-43a9-bb98-6f5331992f42 in your database to "Cust_ec2ba151-7acf-43a9-bb98-6f5331992f42" in your REST/JSON API ?

How to do it at zero runtime cost, with no boilerplate, with a derive macro ?

Thinking in trees and lines, formatting Rust

5 minute read Published: 2023-09-29

I see my code projects in trees and lines, and it affects how I want it to be formatted.

How to store secrets

11 minute read Published: 2023-06-06

My requirements and solution for a safe storage of personal secrets.

Contributing to my FOSS projects

4 minute read Published: 2023-06-02

As I maintain several FOSS projects, I figured it would be convenient to have in a central place some concise guidance on contributing.

Manage keybindings in a Rust terminal application

4 minute read Published: 2022-07-28

To deal with hardcoded or configurable key events in a cross-platform terminal application written in Rust, you'll probably need to

  • determine what keybindings you can really use,
  • use convenient hardcoded keybindings,
  • and read keybindings from a configuration file

Adjust your application for a light or dark terminal

6 minute read Published: 2022-07-16

So you want your unix application to select different sets of colors depending on whether the terminal is set to a light or dark theme ?

Here's an how-to. It's first targeted at Rust programmers but each step can be ported to other languages.

How not to learn Rust

16 minute read Published: 2021-12-15

I've seen too many good programmers struggle learning Rust, or even give up.

Here are the mistakes I've seen which may make you fail at learning Rust. I hope this list will help you avoid them.

Reclaim space on disk

4 minute read Published: 2021-11-02

As my disks tend to be quite messy with time, I had to devise ways to reclaim space, which means both spotting big directories and files, and to deal with the thousands of duplicates you can't delete one per one.

Here's my toolbox for cleaning my disks on linux in 3 major steps:

  1. Confirm the problem with lfs
  2. Spot and delete big files and directories with broot
  3. Delete thousands of duplicates with backdown

Proper conversion from XLS to PDF in Java

3 minute read Published: 2021-06-30

Generating or modifying Excel files in Java is easy with Apache POI.

But when you generate Excel reports, you always end up having to export them in PDF too.

If you look for a library for this conversion, you'll find many ones, most of them expensive, and none of them giving acceptable results.

I explain here the efficient and reliable enough solution I've used in a Java application.