RSSAmplifier

Blog

Emmanuel Gautier

emmanuelgautier.comRSS feed ↗44 posts

Latest posts

How to pass npm flag with Cloudflare workers during install

I have encountered an error forcing me to use the `legacy-peer-deps` flag with npm. But it is not so simple with Cloudflare workers because install command is not configurable easily. In this blog post, we'll look how to pass npm flag with Cloudflare workers.

Missing Authorization header in Apache

Apache remove Authorization header for security reasons. Here is how to fix it.

Migrate URLs in Next.js

How to migrate URLs in Next.js to avoid 404 errors and improve SEO with permanent redirects.

Use REST API with Terraform

Sometimes you need to interact with a REST API from Terraform because there is no provider available or the provider is outdated. Here is a solution to interact with REST APIs using the `http` provider or a REST API provider.

Optimizing ESLint Performance with TIMING and Caching

This article provides practical steps to enhance code linting efficiency with the TIMING environment variable and ESLint caching, for faster development processes in large codebases.

How to solve Docker compose error ".labels array items must be unique"?

This blog post provides a clear understanding and a solution for the docker compose error `array items must be unique`.

Installing Production-Only Dependencies with Dev Dependency Hooks in Node.js

There might be situations where you want to install production dependencies only but you have npm scripts using a dev dependency command. For example it can be the case if you use the `husky` package. In this blog post, we'll look how to install production-only dependencies with hooks using dev dependency.

Collapsible sections in Markdown

Collapsible sections can help keep markdown organized and user-friendly. In this quick guide, we'll show how to create collapsible sections in a markdown.

How to construct URI with URI Template

We often use predefined variables and template string to assemble URIs but there is a better approach called URI Template. This approach enables us to create URIs on-the-fly by replacing placeholders with actual data, making our code more flexible and maintainable.

Inject HTML content into an Astro component

While working on a project within the Astro framework, I encountered a scenario where I needed to fill HTML content within a script tag.

Read Package.json file from Node.JS module

When you write a program you may want to read the content of the package.json file like what is the current package version. Here is one very simple way to read the content of this file.

Import a JSON file content from a Node.JS module

With the new Node.JS module it is possible to read the content of a JSON file with the import function but there is the right way to do it.

Configure yarn version for Cloudflare page build

With the new Cloudflare page build system, yarn package manager version can be more than version 1. But we can keep yarn version 1 configuring the build system with a package.json property.

How to pass a String Map as a Command-Line argument in Go

When building command-line interface (CLI) applications in Go, you may need to pass a string map as a command-line argument. There are different ways to accomplish this, but flag module provides an easy way.

Introducing new blog about OAuth, OpenID Connect, and IAM Solutions

I'm excited to announce the launch of a new blog named CerberAuth, where I'll be exploring the world of OAuth, OpenID Connect, and IAM solutions for modern security.

Formatting Big Numbers in JavaScript

When working with large numerical values in JavaScript, it can be challenging to display them in a way that's easy to read and understand. In this blog post, we'll explore techniques for formatting big numbers in JavaScript with built-in methods.

Changing Document Field Types with MongoDB

This article explains how to convert document field types during query execution and how to use MongoDB's built-in aggregation operators $convert. The article also provides practical examples and code snippets to demonstrate how to change field types in MongoDB.

Solve React error "Property autocomplete does not exist on type"

Sometimes, it happens that an easy-to-solve issue takes you more time than it should. The Typescript React error "Property autocomplete does not exist on type" is maybe one of them.

How to use Chakra UI Button and Link components with NextJS Link

There is some glue to add to make Chakra UI and NextJS work together. The Chakra UI components do not generate the "a" tag by default for a link. Let's see how to use the Chakra button to generate links between pages.

How to solve Envoy "Jwks remote fetch is failed" error response

A way to authenticate requests to an API is to use a Bearer JWT. If you want to make Envoy validate tokens, sometimes you may have the error `Jwks remote fetch is failed`. There are at least three reasons this error appears, so let's check them to fix this issue.

Publish on Cloudflare Pages with unsupported language versions

It may happen that a version of Node is not supported yet by Cloudflare and will remain not supported for some weeks. That can happen even if it is a Long Term Support (LTS) version. Here how to build even if cloudflare does not support the version.

How to fix DNS Internal Resolution inside the Nginx docker container

Sometimes, errors with Docker and some containers can become cryptic when it is about networking. Today, it was Nginx that was not able to reach another container.

Extends Express session SessionData type

Express Session allows to store a lot of different data. There is a Typescript type named `SessionData` which allow to know what contains a session but not the data you will defined after without defining them.

Keep the same Node.js version between local environment and Github Actions

It can be complicated to have the same Node version between the local environment and the CI/CD. The latest Node.js version or the latest lts is released recently and if you want to upgrade to the Node version, usually you can forget to configure one environment.

Publish multiple projects on a Monorepo on Cloudflare Pages

All the tooling provided by service providers is great and makes the developer's life much easier. Usually, those providers connect one git repository to an application. It works fine but it is not so easy when you work on a monorepo or if you want to make multiple deployments for more than one locale from only one source code.

Convert a JavaScript object to queryparams string

This post describes two very simple ways to convert a JavaScript object to a querystring both in a browser environment or server environment.

Succeeding understanding tech as a non-technical person

It exists a lot of technical terms. If you want to better understand the product team, you are at the right place.

MySQL Docker Image for Mac ARM M1

MySQL official Docker image is not available for Apple ARM-based M1 and M2 CPUs. But there is some options to use mysql image on Mac and more globally on ARMv8 microarchitecture.

ESLint Global Variables

When we use some global variables defined elsewhere, eslint throws an error saying the variable is not defined. Here is how to configure eslint to ignore those.

Extend Window type with Typescript

Some of the object properties or functions are not available in the Typescript Window type. Let see a way to extend the Window type with the missing properties.

How to deal with Docker Hub rate limit on AWS

Since 2020, DockerHub has been limited to only 200 container image pull requests per six hours. This article will help you to deal with this limitation on AWS.

Gatsby + Netlify CMS + TailwindCSS Starter

Just created a new starter coming from some of my website development and powered with Gatsby.

How to enable Python type checking in VSCode

Python now has support for type hints. In this article, we will see how to enable better IntelliSense and type checking analysis in VSCode.

How to render a React element to an HTML string?

What happens when you want to render a React string to HTML? For some reasons, you may want to have the generated HTML string from your React component instead of a mounted component and render it on the page.

How to manage Internationalization with NextJS SSG

Staticaly generating a website with the NextJS framework in different languages is not so obvious.

How to render emojis with JavaScript

For the content of your posts, emojis add some fun to your pages. This short post explains how to make that possible in JavaScript.

Git case sensitive

Today, I was wondering to know why on the CI pipeline, tests were failing due to missing files but those files are on the file system locally and push on the GIT repository. This issue came from files renamed updating from lowercase to uppercase.

MySQL Users & Permissions

Database administration includes users and permissions management. Most of the time, a UI like, MySQL Workbench or PHPMyAdmin, is available to perform users management actions. Here, we will see how to do some MySQL users and permissions management with SQL queries.

Install and configure a DNS server with Bind9 on Linux

A service DNS (Domain Name Service) allows domain name resolution to an IP Address and other resources. This service is useful for example for browsing internet websites and not have to know IPs addresses for these websites.

PHP Ternary Operator

The usage of the ternary operator is not the simplest and the most readable way to develop but can be useful for simple conditions. The implementation of the ternary operator depends on the language, let's see how to do it in PHP.

Update NodeJS with npm

New NodeJS releases are done often, so you need to keep your installation up to date. To do so, you can use your Linux distribution package manager (apt, dnf, ...) or brew for OSX. Another way is to use npm..

Install SASS and Compass on Ubuntu

SASS is a CSS preprocess used by many web projects. It allows to generate a CSS style sheet from a language close to CSS syntax.

Undo a git add

An unwanted " git add " can happen. That's why there is a command to redo this " git add ". Here the command line to perform this action.

Install a Chrome Extension outside from the Webstore

You may already encounter the case when you see a Chrome extension source code but you don't know how to install it. In this case, you may want to follow the steps below.