RSSAmplifier

Blog

Guillaume Briday's articles

Hi! 👋 I'm a Senior Full-Stack Software Developer. You will find all my articles related to programming, DevOps, High-Tech and more.

guillaumebriday.frRSS feed ↗66 posts

Latest posts

Add read-only permissions to your Rails API tokens

Slog app, my time tracking SaaS, exposes a public REST API following the JSONAPI specification. Authentication is straightforward: the user generates a personal API token from their profile, and sends it as a Bearer token. Simple, but until recently…

How to use Claude Code from your iPhone with Tailscale and Termius

Claude Code runs in a terminal, on your machine, with your files and your git repositories. That's exactly what makes it good, and also what ties you to your laptop . But a lot of the time, you don't need to be at your desk. You want to kick off a…

Make your code clearer by removing redundant variables

One thing I often notice when reviewing Pull Requests, whether on private projects or open source repositories, is the use of unnecessary variables . These variables add noise , clutter the codebase , and make it harder to read , debug , or simply…

How to migrate your database from PaaS to Kamal

Slog app was my latest money making app still running on a PaaS. It was finally time to make the switch, and here's how I handled the migration with Kamal. Following the techniques outlined in our previous post, How to Backup and Upgrade your…

How to Backup and Upgrade your database with Kamal

It's essential to back up your database externally in case of failure. One advantage of using Kamal is that you're not locked into a specific hosting provider , which greatly simplifies migration. Even if your database files are stored on a db…

Deploying production, staging and review apps environments automatically with Kamal on CI/CD

One of the features I truly appreciate about PaaS platforms like Heroku, Netlify, or Vercel is review apps . The idea is simple but powerful: spin up a temporary environment to test new functionality from a Git branch before pushing it to production.…

Deploying Nuxt 3 with Kamal 2 on Docker: Statically or with SSR

I often deploy static websites and have experience with various tools like Nuxt, Next, Jekyll, and Gatsby. Platforms like Netlify, Vercel, and Cloudflare make it easy to deploy a Nuxt app. Personally, I’m a big fan of Netlify because it is both…

How to deploy Laravel with Kamal 2 and SSL certificate on any VPS

I recently purchased a new dedicated server and decided to deploy my most starred GitHub project, laravel blog. Since this project has never been in production, it can be difficult for developers to get a clear sense of what it looks like without…

Build Magic link authentication for Devise natively in Rails 7.1 thanks to generates_token_for

Today, I decided to implement a Magic Link authentication system for my SaaS app, Slog app. The app’s authentication is powered by Devise and Rails 7.2. Rails 7.1 introduced several new features, but the one we're focusing on here is the generates…

How I use OpenAI to translate my Rails application into multiple languages

I recently decided to add multiple languages to my time tracking application, slog app.com, to expand its market reach. The application is a monolith built with Ruby on Rails. Thanks to AI, you can easily automate the translation of all your keys in…

How to Deploy and Scale your Rails application with Kamal

For bigger projects, it might be a good idea to split the workload among multiple servers based on their specific purposes. For instance, in our case, we would like one server for our database, another one for Redis, one for our background job…

How to deploy Rails with Kamal, PostgreSQL, Sidekiq and Backups on a single host

In the previous post, How to deploy Rails with Kamal and SSL certificate on any VPS, we saw how to deploy a simple Rails application with Kamal and Docker. But it was intentionally very simple and even if it might be enough for some applications like…

How to deploy Rails with Kamal and SSL certificate on any VPS

Kamal is a tool to help you deploy your Web applications anywhere in the cloud or your own machines with Docker. To quote their headline: Kamal offers zero downtime deploys, rolling restarts, asset bridging, remote builds, accessory service…

Rspec: Natively control Time with Rails

You can natively control Time in your specs with Rails. You don't need additional gems like the really good Timecop. Rails has a built in mechanism to do exactly the same thing. How to use it? Include the ActiveSupport::Testing::TimeHelpers module in…

Best way to keep two folders in sync

Sometime, you have to keep two folders in sync. They can be on external devices like SSDs or HDDs, on remote servers or on NAS for instance. It could be really handy when you want to share files with friends and coworkers or deploy static or PHP…

Hotwire: Lazy load content with a <turbo-frame>

I recently wrote a blog post on Per Angusta's blog to show you how use Hotwire to lazy load content in your application with no effort. Take a look 👉 How we use Hotwire to reduce loading time.

Hotwire: Reactive search form without JavaScript

You don't need complicated yet fancy front end frameworks like React or Vue to create reactive index. Let's see how we can do it with Hotwire, a dead simple form and the new turbo frame concept. What we want to do Most Web applications have index…

Installing Pi-hole on a headless Raspberry Pi Zero W from scratch

If you want to install Pi hole on your network, you might be interested in using a Raspberry PI. It's cheap and easy to set up. If you already have a device that can host Pi hole maybe you don't this at all. In this post, we will go through all the…

Je commence un Podcast

J'écoute des Podcast depuis plus de dix ans maintenant et ce format m'a toujours plu. Je suis un passionné du Web et j'ai envie de parler de beaucoup de sujets, il fallait que je me lance ! Je fais déjà un blog sur lequel je vais continuer de…

Why I stopped using Docker for local development

I've been using Docker for almost 5 years now. I wrote blog posts on it and I enjoyed using it for a long time, it solved many of my problems and simplified my life as a developer, but I'm done with it.

Introducing Stimulus components

Stimulus components is a bunch of Stimulus controllers that stick to the Stimulus philosophy as much as possible. Because Stimulus controllers are vanilla JS Classes, you can extend them or use the directly in your application.

13 tips to write better Rails code

Writing clean code is the key for maintainable and sustainable code. Here's some of my favorite tips I could give you after many years working on Rails and Ruby.

Using Vue.JS in backend application with Scoped Slots

If you ever have implement Vue.JS or any others UI libraries like React in your backend application, you probably know that there are multiples ways to achieve that.

Rendering React Components With Custom Elements

A common approach to render a component in React is to call the ReactDOM.render method on a DOM element. If you want to use both React and your backend templating engine at the same time, you're probably going to do something like that. For instance,…

How I efficiently stay up-to-date

I’m often asked how I stay up to date, what my tips and tools are, and how I’ve spent years refining a system that works for me. In this article, I’ll try to answer those questions and share my process in detail. While this post mainly focuses on…

Free up space on your SSD as a developer

If you're a developer with a Mac, it's very likely you've experienced a lack of space on your SSD. Modern tools like Docker, Node, or Brew can be very demanding in terms of space. Let's look at some quick commands to free (a lot of) space safely.…

Managing DNS for a reverse proxy

If you use multiple web applications on one or more servers, you will need to use a reverse proxy like Nginx or Traefik. (We'll have the opportunity to talk more about Traefik soon, by the way). In this case, you are faced with the challenge of…

Backing up a Linux server to a Synology NAS with Active Backup

Synology recently updated its enterprise backup solution, Active Backup Suite. This package can be used to back up multiple services such as virtual machines, Windows PCs, and file servers. In our case, we are focusing on the last option: backing up…

Signing your Git commits with GPG

On Git, there's a way to prove that you are indeed the author of a commit, allowing others to verify that it comes from a trusted source. Today, we are going to see how to set up this functionality. To sign commits, we will use GPG keys. Similar to…

Laravel & Vue.js - Building a Todo list, Part 6: Some Refactoring

I've taken the time to refactor some parts of the code since the last article. No major changes, but updating dependencies forced me to make several modifications that I wanted to present before continuing the series. Separating the Webpack…

Laravel & Vue.js - Building a Todo list, Part 7: Managing tasks with Vuex and Axios

We have reached the heart of the application: task management. This is the central part of the project and the most important for end users. I've gone through several iterations on the design and functionality to produce a first version that…

Relative dates in PHP

Managing dates has never been an easy task, and the programming language doesn't change much about that challenge. There are libraries like Carbon that greatly simplify date manipulation, but it often takes some mental gymnastics to know what result…

Using Docker Networks from the Host

If you use Docker and Docker Compose extensively, you know there are a few inconveniences, including managing networks from the host and between containers. We'll see how to simplify its usage (a bit). Docker's DNS Your containers are within the same…

Laravel: How to better organize your routes

By default, Laravel comes with four route files to manage the entry points of our application. These files handle routes for APIs, WebSockets, console commands, and, of course, web browsers. If the application is small or medium sized, it's still…

How to install and use GitLab Runners

If you've ever worked with GitLab, you might have had the opportunity to explore continuous integration (CI). Today, we’ll discuss what a Runner is and how to set it up. Why use it? Continuous integration allows you to run your tests and builds…

Properly setting up your development environment

Today, I want to discuss a topic that is very important to me. Setting up your development environment and computer is a fundamental aspect of your organization and daily workflow. It is crucial to manage your dependencies, tools, and have an…

Laravel & Vue.js - Building a Todo list, Part 5: Authentication with Vuex and Vue-router

Now that we have set up the development and production environments for the application, we can create our first interface and component for authentication. Before going further, since the previous article, I added a plugin to delete the contents of…

Laravel & Vue.js - Building a Todo list, Part 4: Setting up the frontend application with Webpack

This is one of the most important parts of the frontend: setting up the environment with Webpack. Before starting I didn't start from a blank project; there are official templates you can install to get a basic configuration for your project. To use…

Laravel & Vue.js - Building a Todo list, Part 3: Using API Resources

Since Laravel version 5.5, we can use API Resources. Before this addition, we had to use packages like Fractal, which is, I think, the most well known. API Resources allow us to structure the data we will return in JSON format. We are going to…

Laravel & Vue.js - Building a Todo list, Part 2: Authentication with JWT

Before starting to develop the features of our application, we need to set up authentication. For this project, I am using JWTs. This article is not intended to explain how JWTs work. If you want to learn more, I invite you to watch Grafikart's…

Laravel & Vue.js - Building a Todo list, Part 1: Introduction and objectives

I am going to start a series of articles to present a project that I have wanted to implement for some time: a Todo List!! Well, I admit that doesn't sound very exciting, but let me present the concept, you'll see that there are plenty of cool things…

Docker: Improving Performance with Caching

Today, we’ll discuss how Docker works on macOS and how to optimize its performance using caching. Before diving deeper, it’s important to understand how Docker operates on macOS and Windows. Docker runs only on the Linux operating system; it doesn’t…

Docker: Custom networks

This article is a follow up to the presentation I gave on Docker: Understanding and Implementing Docker. I received some relevant feedback and wanted to revisit points that I believe are important. Networks I didn't specify this earlier, but Docker…

Ansible: Automating server installation

This article is the first part of a step by step deployment guide for a project using multiple technologies. Here, I will deploy my laravel blog project. It is built with PHP and Laravel, but the process will be quite similar for other languages or…

Capistrano: Automatically deploy Laravel with Docker

This article is the second part of our step by step project deployment series. This time, we’ll automate the deployment process using Capistrano and Docker compose. You can find the server setup in the previous article: Ansible: Automating Server…

Using the SSH command to access a Vagrant machine

If you regularly use Vagrant, you know that to access the virtual machine, you need to use the command: Without much explanation, Vagrant connects us to the virtual machine as the user vagrant . However, if a private network is defined and you know…

Macbook Pro avec Touch Bar : Un an plus tard

Depuis la sortie du MacBook Pro 2016, j'entends un peu tout et n'importe quoi à son sujet. Je vais essayer de faire un retour d'expérience après presque un an d'usage. L'idée est de casser un peu les mythes et légendes que j'entends, mais aussi de…

Ajouter de la RAM sur un NAS Synology 1515+

Comme j'ai pu en parler sur le blog, j'ai un NAS Synology 1515+, c'est une petite merveille et je m'en sers absolument tout le temps. Depuis un moment maintenant, ce NAS a remplacé en grande partie les outils que j'utilisais au quotidien. Pour ne…

Issues with Cartesian products in MySQL

Recently, while working on a web development project, I needed to use the SUM aggregation function with multiple JOIN operations. I encountered strange behavior: MySQL was doubling or tripling the expected results . After spending some time finding a…

From WordPress to Jekyll

Up until last May, my personal website and blog used two different technologies, namely WordPress on one side and Pug then Middleman on the other. It was far from ideal to maintain, evolve, or use on a daily basis. So I decided to bring everything…