Serving custom Go import paths for many modules with nginx

When publishing Go code, the usual practice is to distribute the sources directly from the forge that hosts them: github.com/org/project, framagit.org/org/project, … It is convenient, but it durably ties the import path to the chosen provider: the day you migrate from one forge to another, all your users have to update their imports, while every historical fork keeps pointing at the old address.

Fortunately, the go-import mechanism lets you decouple the import path from the actual hosting location of the code. All it takes is exposing, on a domain of your choosing, an HTML page containing a <meta name="go-import"> tag that describes where the sources live.

[Read More]
Tags: golang  nginx  hosting 

Complexity Has Become the Lazy Solution

In software engineering, complexity is often seen as a sign of competence: a simple system looks suspicious, while a complex system looks serious.

I experienced it for ten years with the platform of a cybersecurity competition. This article starts from that story to try to understand why.

Ten years without a major incident

In my final year of engineering school, I built a CTF platform. At the time, no software like CTFd existed, so everything had to be built from scratch.

[Read More]

The pragmatic architecture of my production projects

Reading some discussions between developers or software architects, one might think that the smallest web application today requires a distributed infrastructure, a Kubernetes environment and several specialized cloud services.

Yet many web services, including those that receive several thousand visitors per day, work just as well with a simpler architecture.

Here is an account of the infrastructure behind my production projects, some of which exceed 5,000 daily visitors. I also applied it for years to a cybersecurity competition with more than 250 participants in real time.

[Read More]

Southern China for Digital Nomads: Looking Back on Three Weeks

Southern China for Digital Nomads: Looking Back on Three Weeks

Southern China is not an obvious destination for digital nomads: one rather thinks of Bali, Lisbon or Chiang Mai than of Shenzhen, Guangzhou or Huizhou. Yet I spent three weeks in these three cities, one week in each, and it is an experience I won’t soon forget!

This article is not a tourist guide. It is an account of what it is like to live and (try to) work in Southern China when you are free to choose your workplace: the difficulties, the surprises and above all the Great Firewall, to which I devote a good part of the article.

[Read More]

Hathoris: Bringing Back the Simplicity of HiFi Systems in the Digital Age

Hathoris: Bringing Back the Simplicity of HiFi Systems in the Digital Age

There was a time when listening to music came down to pressing a button: you walked into the room, switched on the amplifier and the music started. No computer to boot, no application to launch, no credentials to remember.

Since then, our music collections have gone digital and streaming services give access to virtually unlimited libraries, but that simplicity got lost along the way. In this article, I introduce Hathoris, the software I wrote to get it back on my amplifiers driven by a Linux machine.

[Read More]
Tags: audio  container  hosting 

Master Your AI: Explore Local AI with OVH for Just 1 Dollar

Master Your AI: Explore Local AI with OVH for Just 1 Dollar

Today, generative AIs meet many uses, and it would be a shame not to take advantage of them. However, in the age of the GDPR, it’s legitimate to question the exposure of customer or partner data when relying solely on AI providers whose data processing remains opaque.

Having myself participated in the construction of one of these new virtual assistant services, I offer here a simple guide to starting up a machine and evaluating the performance of your AI application, or to offering your employees access to sovereign AI, with the aim of easily comparing the different models available.

[Read More]
Tags: ai  cloud  hosting  privacy 

Cloud-init to deploy LocalAI in the cloud in 5 minutes

Cloud-init to deploy LocalAI in the cloud in 5 minutes

It’s possible to use generative AI without sharing your data with companies or states that raid our data.

The world of free software is full of applications for evaluating and using generative AI. After extensive testing, I present here the cloud-init file for deploying your own LocalAI instance in under 5 minutes.

Why LocalAI?

LocalAI is a free software application designed to offer a local, self-hosted alternative to AI service providers. The application features an API compatible with that of OpenAI. The idea is to be able to replace calls to OpenAI from any existing application in the blink of an eye: simply change the domain to which the API points.

[Read More]
Tags: ai  container  hosting  privacy 

Duplicate window display on 2 screens with X.org

As an engineering school teacher and technical lecturer, I’m often asked to give demonstrations, in addition to the classic slide show. Like any organized lecturer, I can’t do without my notes, elapsed time, etc., which are given to me by presenter screen software. This kind of software requires an extended display, i.e. the computer screen and the video projector display 2 different things.

The disadvantage of demonstrations is that the application window you want to show cannot be displayed on both screens at the same time. I’ve tried to solve this problem, in particular to avoid having to do demos while craning my neck, as the window necessarily had to be on the video projector screen, which is really not comfortable.

[Read More]

Unveiling Whiteout Files: Do you know how file deletions are handled between layers of a Docker image?

Unveiling Whiteout Files: Do you know how file deletions are handled between layers of a Docker image?

Union file systems are a mechanism for merging two or more file systems, to present them unified, under a single mount point for the user.

The main idea behind this mechanism is to be able to alter the contents of the first file system (e.g. the contents of a CD-ROM) by writing all changes (additions, deletions, modifications) to the second (which could be a disk partition, a USB stick, …).

[Read More]

Unify HTTP requests and GRPC calls on a single domain for more flexible configuration: example with Woodpecker

Unify HTTP requests and GRPC calls on a single domain for more flexible configuration: example with Woodpecker

I installed the continuous integration service Woodpecker, to replace DroneCI, which the company that bought it decided to bury. As Woodpecker is a fork of the latest free version of Drone, its use is broadly similar.

However, the teams have taken different directions on certain aspects, and communication with agents/runners, which used to be via websockets, is now carried out in Woodpecker using the GRPC protocol.

The solution proposed by the Woodpecker documentation is to use 2 domains: one will be used for the web interface and the REST API, the second will be used for GRPC. Is this really necessary?

[Read More]