Skip to main content

2 min read
Christophe

Exterminate them all, fight spam directly at your host company

If your web host company offers you a cpanel access, you will find there access to a tool called SpamAssassin.

There, you've two main options: the Spam filter and a White list.

Using the first one, you can define email patterns like *@hair.com which mean: immediately kill those emails on the server. The second one is just the opposite f.i. *@my-own-company.com saying that you trust that domain.

PlanetHoster - N0C

If you're hosted by PlanetHoster on the N0C infrastructure, please read Exterminate them all, fight spam directly at PlanetHoster - N0C instead.

One min read
Christophe

WinSCP - Retrieve a stored password

More than once I've found myself in the situation where I've got a site saved in the WinSCP configuration where I've saved the password and, um, gosh, what was it?

Did you know WinSCP provide an option to show you, in plain text, a stored password?

2 min read
Christophe

Autosave feature in VSCode

How many times have you modified a file in vscode (and forgotten to save the modification) in order to refresh it from your web page, run the script from your console, etc., and then thought Oh no, damn, it still doesn't work?

And it can take several minutes and back and forth before, damned, silly me, I didn't save my modification.

And even more so when you've done a Search&Replace in several files; some having been saved and others not.

Let's see how to avoid this.

2 min read
Christophe

Rendering a JSON file as a mind map

https://jsoncrack.com/editor

I really like the idea of not having to draw (actually, that is just because I am really bad at it) a diagram, a flow chart, a graphic representation of something that ... can be written.

Json crack is one of the tools in my toolkit when I want to draw something that can be written in json.

3 min read
Christophe

GitHub - Use Actions to deploy this blog

The last two months, I was using a FTP automation script to deploy the blog on my FTP server.

This way of doing things worked fine but had several inherent problems, the most important of which was that I had to run the script manually (from my computer).

If I modified an article directly from the Github interface or from another computer (where WinSCP was not installed, for example), there was no deployment.

By using Github actions, this problem no longer exists. With each push, the blog will be updated.

One min read
Christophe

Getting the number of published posts

Docusaurus didn't provide an easy way to retrieve the number of blog posts but there is well a trick.

There is an automatic page called archive like https://www.avonture.be/blog/archive/.

On that page, all blog posts are displayed by year and months. With a document.querySelectorAll console instruction it's possible to make the count as suggested on https://github.com/facebook/docusaurus/discussions/9712

8 min read
Christophe

Don't query your PostgreSQL db anymore, prefer PostgREST

Last year I had a large application developed in Laravel that required a MySQL database. When I was migrating to PostgreSQL I discovered PostgREST, which allowed me to completely remove queries from my code.

Don't get me wrong: my Laravel/PHP code was launching dozens of queries to the database and, after migration, none at all.

My tables, my models, my SQL queries, I was able to remove everything from my code. My PHP code has been greatly lightened and simplified.

3 min read
Christophe

Using variables from external file in your Quarto project

My use case is: I need to write some technical, long, documentation where I need to provide some information like IP adresses of used servers, some paths to the application, configuration folders, ...

The normal way to do this is to just put information directly in the documentation and to make sure to update every occurrence in case of changes during the lifecycle of the application.

The best way is probably to use an external file where information are stored in a key-value form and, during the rendering process of Quarto, replace shortcodes by values.