Blog
Here is the place I ramble. Always about technology but scarcely the same topic from one post to another.
I mostly write about programming and associated tools. Whether it’s about personal or professional challenges, I try to describe the issue, list possible solutions and dive into the chose one.
I also share some tutos for my fellow coworkers when the same question comes back to often. Mostly in the French side of the blog though.
Enjoy!
Remove consecutive blank lines with
sedbefore commiting codeI work as an SRE. And part of my job is to write
terraformInfrastructure as Code to maintain and develop the company’s cloud offers.My colleagues and I were planing some code refactoring. And we wanted to somewhat raise the code-quality level. Part of this was to enforce some formatting rules. And, while
terraformhas thefmtcommand which can recursively reformat code, it fails at fixing the no consecutive blank lines rule we wanted to enforce.Now, we’re all grown-ups here and we know this is not a task to be achieved by hand. Not only it’s tedious but also error-prone. It has to be automated so that no
gitcommit ever contains such a thing, ever.It’s snippets time!
I write code for a living. But, do I really? I mean, sure, I write code, but that’s not what I spend most of my time doing. No, the real workflow looks more like this:
- I read and understand a ticket/issue,
- I dive into an existing codebase, explore some documentation,
- When I figure out what to do and where to do it, I write the code,
- Once done with this, I add some tests, commit, push, create a pull request and call it a day.
The experienced programmer knows: only the third point implies writing some actual code. The rest of the list is meetings, readings, and boilerplate. The boilerplate, the code that needs to be written but does not have inherent value. We can actually automate most of the effort using pre-built snippets of code.
Let’s see how to do this in
neovimwith theluasnipplugin. I’ll cover the plugins installation and configuration process and then build some real-life snippets to showcase some advanced features we can rely on.Workflow update
I somewhat recently got a new job. With that a new machine, brand new OS ready for customization. Along a pile of new attributed tasks and its load of meetings of course.
In this post, I write about what I changed in my workflow to better accommodate this changes. I’ll talk about minor
nvimchanges,alacrittyhacks and a newly-discoveredtmuxfeature and a quick feed back on my new favorite synchronization toolsyncthing.Let’s dive right in!
NVim must-have plugins
I’ve recently seen quite a few of people on Mastodon asking for “recommended plugins” as they (re)discover
nvim.I don’t actually know why now. Maybe it’s like the new year’s resolution hitting late for many developers? Something along with getting back to work, full of vacations renewed hope?
Anyway, in this post I’ll try to sum up what I personally would want to find on every configuration. I know there are so-called
nvimdistribution like astro, lazy to name a few. But I feel like they’re too complex, complete and opinionated. I’d rather hand-pick from a list than have too much for my use cases.Here we go!
WASMassets size for ayewapplication in Rust 🦀Few weeks ago I wrote rainbow, a color picker in plain old
HTML/CSS/JS. I needed a color palette as quick as possible so I made this tool the quick-and-dirty way.I then gave this tool some thoughts, rewrote it in
Rust🦀 and called it bifröst. It’s a single page application inWASMand it’s loaded with many more features than rainbow.Let me tell you something : it’s HEAVY! The first iteration weighed
1.4Mo. Way too much for such a small application.This blog post is about the settings and tools to divide its weigh by three.
Goodbye
nextcloud, hellosyncthingI’ve been using a self-hosted
nextcloudfor years. Both my better-half and myself heavily relied on it for files, contacts and calendar synchronization.It’s a mostly straight forward process thanks to the
dockerimage and the awesome documentation. Still, updating is a manual process and I happened to fail once. While I was able to recover everything, it was deemed not safe-enough for work purpose. And so I became the sole user of this server.It’s been more than a year now. And it’s time to move on to another, single-user, approach. It’s no coincidence I choose to do it now : I’ve set up my very own web radio so I don’t need to synchronize my music anymore and I have another solution for heavy files like movies. All that is left is mostly text files that I want to access via multiple machines, with or without graphical user interface.
Without further ado, folks, meet
syncthing!