Jonathan Petitcolas

Full-Stack Web Developer, Open-Source Contributor, Seasoned Speaker

Using NVIDIA GPU within Docker Containers

Diving into machine learning requires some computation power, mainly brought by GPUs. Let's start our machine learning journey by configuring Docker to use NVIDIA GPU.

What I Learned from Updating my Blog Design

I have just updated my blog design to get a moderner look. Integrating it taught me several useful tips I am sharing with you.

Converting an Image into ASCII Art Masterpiece

While browsing Stack Overflow, I generally browse one or two links from the sidebar 'Hot Network Questions'. It brings me to several interesting topics, not necessarily related to development. And this time, I found an interesting post: how do ASCII art image conversion algorithms work?

Learning Jest Through Practice

Jest is a Javascript testing framework published by Facebook. When browsing the official website homepage, three points are highlighted in particular: no configuration, improved performance, and easy mocking. Are they marketing promises, or reality? To answer this question, we will test Jest on a basic React project and explore its various possibilities.

Internationalizing a React Application using Polyglot

Following an Internationalization tutorial is generally quite straightforward. But what about implementing it on a real-world application? Here is a tested solution using Polyglot. We'll also learn how to use context by creating a custom Provider.

Conditional Babel Configuration: Introducing Babel Env

After being stuck for a few hours because of some Babel configuration issues in an isomorphic app, we finally discovered the Babel env property. It allows to apply some sort of conditional configuration, depending on a given environment variable.

Npm (or Yarn) Install within a Docker Container, the Right Way

Docker is awesome. Yet, it brings some common pitfalls, especially when you need to handle file permissions correctly, or need to use SSH. Here are some solutions to counter these issues.

Using HTTPs with Custom Domain Name on GitHub Pages

GitHub supports HTTPs natively, but only for domain names. It doesn't work with custom domain names. Fortunately, CloudFlare, a free (for basic needs) DNS/CDN, provides a solution to use HTTPs any domain. Here is a step-by-step tutorial to secure your own GitHub Pages.

Npm Tips and Tricks

All Node.js developers have already used `npm` to install their favorite dependencies. However, far beyond the very famous `npm install`, npm offers a wide bench of available commands to ease our daily job. Most of them are unknown, so let's enlight them.

Taking Picture From Webcam Using Canvas

I recently needed to take a picture from a web browser using webcam. As this is a basic need, I thought it would be quite easy. Yet, solution is not trivial, and implies both using new user media HTML5 API and some canvas manipulation. Here is a reminder which may be useful to everyone.

Plugging Webpack to Jekyll Powered Pages

I chose Jekyll to power this blog. It allows a blazing-fast display (as rendering is just composed of pure HTML static files) and a free hosting via GitHub. Yet, when I started to build these pages a few years ago, I didn't know about Webpack. Better late than never, let's see how to plug these two powerful tools together.

Minutes of AWS Summit Paris 2016

Thanks to marmelab, I attended to the AWS Summit last month in Paris. Here is our feedback about this event which is, as its name implies, focused on Amazon Web Services.

Webpack HTML plug-in in a Nutshell

I have been using Webpack for several months now, and I ended up to some more optimized solutions than the one already presented on this blog. Let's see some solutions to handle correctly assets paths, cache busting, and use of configuration parameters, using the Webpack HTML Plugin.

How-to dump your Docker-ized database on Amazon S3?

I got a few side-projects in production, a majority using Docker containers. Who says production also says data backup. Here is a post describing how I regularly upload my database dumps directly from a Docker container to Amazon S3 servers.

Importing a Modeled Mesh From Blender to Three.js

In this Three.js tutorial, we are going to see how to import a modeled mesh from Blender to our scene, animating it with some basic rotations.

Minutes of PHP Tour 2015

Two weeks ago, we (at marmelab) attended the PHP Tour 2015, organized by AFUP in Luxembourg. Here is a summary of each talk we saw.

How-to setup Webpack on an ES6 React Application with SASS?

Webpack is really a great JavaScript bundler, allowing to turn messy and numerous JavaScript into a single minified and optimized script. Yet, we missed a good getting started tutorial. Here is one, using ES6 React app with SASS.

Transpiling EcmaScript6 code to ES5 using Babel

During more than a week, we worked hard to introduce some EcmaScript6, the future of JavaScript, to ng-admin. Here is how we transpiled our code to ES5, to ensure every browser understands our code.

Playing with websockets in Go

Go is quite good for asynchronous tasks. So, let's experiment it with websockets, creating a (basic) collaborative text editor, GollabEdit.

Creating JSON Web Token in JavaScript

One of the best way to secure an API is JSON Web Tokens. As understanding a concept passes by experimenting it, here is a post describing how to forge such a token in JavaScript.

Parsing binary files in Go

I am currently working on a Go library to parse Starcraft2 replay files. These files are stored in binary format (called MoPaQ) where each sequence of bytes is related to a specific information. Let's see how to decrypt binary files using Go.

Improve your Linux battery life with TLP

Transitionning from Windows to Linux caused a few troubles. Most painful one was the battery life, which was drastically reduced. Yet, installing TLP boosted my laptop autonomy. Here is how.

Fibonacci sequence generator in Go

Is it possible to develop generators in Golang? Sure! Here is an elegant way based on Fibonacci sequence.

Changing Arduino RGBL color through a web interface

I decided to go further with my Arduino: using a web interface to drive my board. Let's see how to use Johnny Five framework (allowing to program on Arduino with Javascript and to allow a browser to change my LED colors.

Creating a Morse encoder with Arduino

A few days ago, I received a brand new Arduino. Let's try a first prototype: a Morse language encoder, using a simple LED and a few lines of code.

Finding out slowest tests of your PHPUnit test suite

We just wrote a brand new visualization tool provideing a quick way to monitor your PHPUnit test suites. Within a single glance, you will be able to identify the slowest tests, helping you to improve the overall execution time of your tests.

Building a static website with Silex

I recently helped a contact of mine to develop her company website. Her needs were basic: some static pages and a FAQ. No need for a whole big framework for such simple needs. So, let's look on Silex, a great PHP micro-framework.

Create a clickable SVG map

How to create a clickable SVG map without using obsolete Flash or bad-DX image maps? A single answer: SVG!

Simulate marquee tag in CSS and Javascript

I am sometimes asked how to simulate `marquee` tag in full CSS. Even if it is deprecated, we can't always convince customers to not use such an accessibility disaster. Hence, here is a CSS alternative.

Create a rotating cube in WebGL with Three.js

Let's discover awesome ThreeJS 3D library with a simple purpose: animating a rotating 3D cube.

Using Sublime Text 2 for web development

Sublime Text 2 is an awesome text editor, a worthy successor to Notepad++. It supports great features , is really reactive, and is cross platform. Moreover, it embeds a package manager allowing you to install or remove very easily community plug-ins. Here are the details of my own installation.

New Year, New Start...

I have decided to commit myself into two major professional changes this incoming new year: accepting a new job proposal and closing my own company. Here are the changes.

Migrating to GitHub Pages

I used WordPress during several years, since the first time I blogged. However, this tool complexity becomes too high for my basic needs. It is time to find a new tool to focus on writing. GitHub Pages looks like the perfect solution to me.

Installing WordPress as a Git submodule

Updating a WordPress blog with all its plug-ins may be very time-consuming, especially for those who maintain several blogs. Fortunately, there is a solution to reduce maintenance time. Using Git, you will be able to update your blogs just by checking out the new tag of your WordPress submodule.