Tag: lang:en - Articles:

Setting up linters in Gitlab CI for C++ and Groovy / Jenkins code

A very short blog post to share some minimal code snippets on how to quickly and easily setup Gitlab CI pipelines to run static code analysis tools on C++ code and Jenkins pipelines (or any Groovy code). Linting C++ code with clang-tidy clang-tidy is a clang-based C++ linter tool that …

Read More

Psi*Run - Le Manoir

Escaping the madness par Martina Lexi - CC BY-NC-SA Psi*Run de Meguey Baker, traduit en français par Alexis Lamiable, est un jeu que j'adore. Je l'ai déjà évoqué ici à plusieurs reprises. La semaine dernière, j'ai eu l'occasion de faire une session de ce jeu de rôle avec quelques amis …

Read More

Another animated dungeon: The Sky-Blind Spire

Following last week animated PDF adventure, I have been reading a series of one page dungeons... And yesterday I had the opportunity to play the best one in my opinion: The Sky-Blind Spire by Michael Prescott. It has everything I love on one page: a maze to explore, mysteries to …

Read More

Animated one-page-dungeon : Escape of the Torment

Last week, while translating John Harper's micro-TTRPG World of Dungeons: Turbo Breakers, I discovered the wonderful world of one page dungeons, starting with Michael Prescott splendid production at trilemma.com and also the yearly One Page Dungeon Context. While crawling through the OPDC 2021 entries, I discovered a great map …

Read More

Deploying AWS API Gateway static endpoints using Terraform

Recently at work, at SNCF Connect & Tech, we needed to expose some static documents as HTTP endpoints: a GET /version that would provide some information about the application version as JSON, and a GET /openapi/yaml that would return the OpenAPI 3 specification of our HTTP API as YAML. We …

Read More

fpdf2.5.2 : SVG support and borb

fpdf2 is a simple & fast PDF creation library for Python that I have been maintaining since mid-2020. In this article, I'm going to present some of the new features that landed since my last post on the subject. Hence, this will cover versions 2.5.0, 2.5.1 & 2 …

Read More

5 Minute Dungeon : variante CIBLE

(English speakers : go to BoardGameGeek to find the variant & companion web-app for this excellent game) 5 Minute Dungeon est une très belle découverte de Noël ! Il s'agit d'un jeu coopératif basé sur la vivacité, avec comme thématique l'exploration d'un donjon de fantasy (façon dungeon-crawler / PMT). Pourquoi c'est bien ? Parce …

Read More

Hacktoberfest on fpdf2 & v2.4.6

Last month, I realized late that October was hacktoberfest month! This online event is a month-long celebration (October 1-31) of open source software run in partnership with different software companies, with a focus on encouraging contributions to open source projects. While I participated in the 2019 edition as a contributor …

Read More

Images sous licences libres

Ce blog voit l'apparition d'une nouvelle page permanente : Images libres de droits. Cette page recense des site web, des illustrateurs, des icônes et des polices de caractères libres de droits. Depuis octobre 2018, j'ai rassemblé une liste d'artistes dont j'apprécie le travail et qui placent leurs œuvres sous licence Creative …

Read More

World map of an open-source project contributors

I have been amazed recently at the diversity of contributors on the fpdf2 project, coming from all around the world! Then I thought it would be nice to visualize this diversity by building a world map of all contributors locations. There it is: Click on the image to access an …

Read More

Live demo for Hesperides!

Today I finally took the time to put up a live demo website for Hesperides! https://hesperides.herokuapp.com Hesperides is an open source tool dedicated to configuration management: it stores applications properties and mustache templates for configurations files. It is strongly hierarchized based on few main concepts: modules, applications …

Read More

fpdf2.4.0 and converting GIFs to PDFs

fpdf2 is a minimalist PDF creation library for Python that I am maintaining. With the release yesterday of its v2.4.0, I'm going to present some of its notable new features since the latest minor version. https://github.com/pyfpdf/fpdf2/ Doc: https://pyfpdf.github.io/fpdf2/ JPEG images …

Read More

1213, an indie video game from 16 years ago

When was the last time you wanted to play again an old video game? Personally, I don't usually re-play video games. I'm always more tempted to try a new interesting one found on WarpDoors. I have the impression that this is common to most video game players, whether the prefer …

Read More

Undying Dusk : a PDF video game

Undying Dusk is a video game in a PDF format, with a gameplay based on exploration and logic puzzles, in the tradition of dungeon crawlers. A curse set by the Empress keeps the world in an eternal dusk. You have recently found shelter in an eerie monastery. Featuring: ~ 200 000 …

Read More

Deux variantes pour La Route Des Vignes

(English PDF rules at the bottom) Il y a quelques années, lors du festival Paris est Ludique, nous avions testé une petit jeu qui nous avait bien plu : La Route Des Vignes de Eilif Svensson & Kristian Amundsen Østby, édité en France par Matagot. Pour une description du jeu, je vous …

Read More

fpdf2.3.0 Unbreakable! and PDF quines

Today, I am happy to announce version 2.3.0 of fpdf2, code name: Unbreakable! https://github.com/pyfpdf/fpdf2/ Doc: https://pyfpdf.github.io/fpdf2/ Why Unbreakable? As a tribute to M. Night Shyamalan movie Because using fpdf2, your Python code can never break! ... Just kidding, I would be …

Read More

fpdf2 release 2.2.0

Today, I am happy to announce a new version 2.2.0 of fpdf2 ! https://github.com/pyfpdf/fpdf2/ Doc: https://pyfpdf.github.io/fpdf2/ During the last few months, I contributed a few improvements to fpdf2, David Ankin fork of PyFPDF, the user-friendly Python library to generate PDFs: from …

Read More

Pelican, Pingback and Webmentions

Linkback protocols are an old breed. They were born in a time where MySpace, Wikipedia & WordPress had just been launched, and Friendster was more popular than this new website called Facebook. Diagram source: PPRuNe article on linkbacks The latest linkback protocol, Webmention, is relatively recent though, as it became a …

Read More

Minutes of the FOSDEM 2020 conference

The FOSDEM'20 (Free & Open Source Developers’ European Meeting) conference is: a free event for software developers to meet, share ideas and collaborate It took place last week-end at the Université Libre de Bruxelles, and I had the chance to attend it. Sincere thanks to my employer, oui.sncf, for financing …

Read More

Pandemic: Worldwide Research Program & Mass Migrations

(English version below) Il y a trois ans, j'évoquais sur ce blog quelques variantes pour le jeu de société Pandémie. Voici le moment de vous en présenter deux que j'ai confectionné récemment, et dont les playtests étaient suffisamment amusants pour que je les mette en page, afin de les partager …

Read More

Using python requests-futures to crawl all jobs on a Jenkins 4 times faster

At work, we needed to retrieve the full list of jobs a given Jenkins instance was hosting. Our first solution was to use the jenkinsapi Python package: import xml.etree.ElementTree as XmlElementTree from jenkinsapi.jenkins import Jenkins def get_all_jenkins_jobs(server_url): jenkins = Jenkins(server_url, lazy=True, timeout=30, username=os …

Read More

GitHub project statistics and Python interactive coding

Iframes not supported. Click on the link below to access the graphs. The iframe above displays some graphs I've built last week, in order to get some insight on some GitHub projects issues & pull requests evolution. They are directly inspired by nf-core project activity statistics. Click here to open those …

Read More

Dungeon Heart

(scroll below for the English version) Hier, en compagnie de trois fidèles playtesteurs vétérans, j'ai eu l'occasion de jouer pour la première fois à Dungeon Heart, mon coup de cœur de la Pamphlet Dungeon Jam. Très franchement, le jeu était carrément à la hauteur de mes attentes, et je crois …

Read More

Mothership Hive Mind

In June this year, Sean McCoy published a tabletop RPG called Mothership. It has recieved tons of positive reviews, including /r/rpg December's Game of the Month award: It's a d100 sci-fi/horror system, perfect for running Alien or Event Horizon, but it is most importantly exceptionally well designed. Every …

Read More

Dog bear

(English version at the bottom) Cette semaine, nous avons testé le jeu de rôle Dog Bear, du collectif australien Invincible Ink, où l'on joue des soldats d'élite faisant leur compte rendu de mission à leur supérieur. Le jeu est paru en 2015, le PDF en anglais coûte 5$ et il …

Read More

Listing all GitHub security alerts of a user's projects using GraphQL and Python

Almost a year ago, GitHub introduced security alerts. They are an awesome feature. They function as notifications you receive whenever a vulnerability affecting one of your project dependencies. But long after receiving a notification, how to list all security alerts affecting your repositories ? I didn't found an out-of-the box solution …

Read More

Displaying chained exceptions stacktraces in Python 2

At work we have a component not yet migrated to Python 3, and we recently had some difficulties diagnosing a problem with the MySQL connector. Because we were catching the mysql.connector.errors.Error and raising a custom exception, we were loosing the underlying stacktrace and hence couldn't troubleshoot the …

Read More

Python module imports visualization

flask httpie requests simplejson botocore scrapy docker-compose ansible What are those diagrams ? They show dependencies between the internal modules of various well-known Python libraries. They goal is to provide a global overview of a Python project architecture, as a map of modules & packages, the top-level code abstractions. Note that all …

Read More

Free alerting-as-a-service drop-in replacement for mail command

On my personnal server, I used to send myself alerts by email using the handy standard mail command. However, recently it appeared that my server became categorized as "spammer" by some online service providers, due to the alerts frequency (a little bit more than one per day). Hence, I got …

Read More

Daniel Linssen latest wonderful games

Daniel Linssen, aka managore, is a fantastic indie game developer. I already mentioned one of his games, HopSlide, in a previous blog post (FR). Now that it's clear that I am totally unbiased about this incredible game maker, lets talk about his latest games ! WalkieTalkie This first one simply amazes …

Read More

Extracting setup_requires dependencies out of a setup.py

I ended up not using this code, but it may be useful to others: mock_setup_provider.py: import sys from unittest.mock import Mock class MockSetupProvider(Mock): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.captured_setup_requires = set() def setup(self, *args, **kwargs): self.captured_setup_requires.update(kwargs.get('setup_requires')) setup_extractor …

Read More

Is there any equitable dumbphone or laptop out there ??

Hello all. This is an open request : does anyone know about equitable non-smart phones or laptops, ideally long lasting and for the laptops: easily repairable with open-source componants ? I know about Fairphone, but I couldn't find anything similar for simpler "feature phones". By the way, I stumbled upon their cost …

Read More

JSONP & exceptions with Spring web 4

Since Spring 4.1, it is really easy to enable JSONP on an API controller: @RestController @RequestMapping(value = "/") public class MyController { @ControllerAdvice static class JsonpAdvice extends AbstractJsonpResponseBodyAdvice { public JsonpAdvice() { super("callback"); // name of the query parameter to use } } @RequestMapping(value = "/", method = RequestMethod.GET) public MyAPIResult getStuff(...) { ... } } There is no RFC …

Read More

Python gevent terrible failure mode under Windows

What do you think of the following innocuous Python code ? from gevent import monkey monkey.patch_all(thread=False, select=False) import requests requests.get('http://i-do-not-exist.com') print('THIS WILL NEVER BE PRINTED !!!') Guess what ? The string message will never get printed :( Simply remove the monkey.patch_all line and you'll …

Read More

Rendering deep text-based mindmaps with WiseMapping and Python

In this blog post, I'm going to demonstrate how to reuse WiseMapping HTML+JS rendering engine to easily visualize... text-based mindmaps like this one have many benefits they are readable as-it-is they don't require any tool to be edited [they follow the UNIX tenets](http://www.ru.j-npcs.org/usoft …

Read More

Solarized mindmaps with Python and graphviz

This week I wrote a small Python script, that can generate a mindmap from a simple indented text input like this: Winter december january february Spring march april may Summer june july august Autumn september october november The command: ./graphviz_mindmap.py seasons.txt. The results, with various layout parameters: Another …

Read More

Solving a painful browserify limitation : portable source files selection with a wildcard pattern

In any UNIX shell, the following will always work out of the box: browserify src/main/lib/js/*.js > out-bundle.js But of course, not under Windows. And browserify does not accept directory names as primary parameter, nor wildcard globbing patterns. There is a pending issue & pull request aiming to …

Read More

Fixing fonts that raise a &DFLT table doesn't satisfy the spec. LangSysCount is not zero& error in Firefox

Did you ever got this infamous error message in Firefox debug console (with CSS error messages enabled) ? downloadable font: Layout: DFLT table doesn't satisfy the spec. for script tag DFLT (font-family: "MyBeautifulFont" style:normal weight:normal stretch:normal src index:1) source: http://W.X.Y.Z/fonts/myfont …

Read More

New release for genealogic-d3

A year ago, I built a small JS lib using D3.js to visualize JSON-defined genealogy trees. At the beginning of the year, I added a new feature using flex-calendar and moment-ferie-fr : a birthday calendar using the same JSON genealogy definition and miniature images. I added this calendar to the …

Read More

Generating SRI hashes with grunt-usemin

I'm not really crazy about Yeoman's grunt-usemin : I find painful the way it enforces a unique pipeline, with its preliminary useminPrepare task and :generated targets. But on the project I'm working on, we made the choice to use it early on, and we're sticking with it for now. And this …

Read More

Colored diff output with Python

Say you are generating a colored diff output with the standard difflib Python package: diff = difflib.ndiff(file1_lines, file2_lines) print('\n'.join(diff)) Now, I'll show you how to write a simple color_diff function that you can use to color your diff like this: diff = difflib.ndiff(file1_lines, file2_lines) diff …

Read More

Disabling error stack traces with SpringBoot, but only in prod

Simply add the following class to your project. It will be automatically registered at start-up if you use the @EnableAutoConfiguration annotation : @ControllerAdvice // Makes this the default behaviour of all controllers @ConditionalOnProperty(prefix = "app", name = "disable-default-exception-handling") class GlobalControllerExceptionHandler { @ExceptionHandler(Exception.class) // Catch any exception @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) // Returns an error code …

Read More

Citations : comédiens & Terror Network

Deux lectures complètement décorellées à partager: Aujourd'hui, pour justifier leurs [les comédiens] droits, on parle d'économie. En 2004, le rapport Guillot remis au ministre de la culture et de la communication, dans l'émotion suscitée par l'annulation du festival d'Avignon, souligne qu'en 2003 "la valeur ajoutée dégagée par le secteur du …

Read More

Quickly finding where you PHP script is stuck

First, install PHP debugging extensions for gdb, for example: debuginfo-install php-5.6.8 # if you use yum aptitude install php5-dbg # if you use aptitude Then simply: php_version=5.6.8 php_script_pid=$(pgrep -f $php_script_name) curl https://raw.githubusercontent.com/php/php-src/PHP-$php_version/.gdbinit >> ~/.gdbinit gdb -p …

Read More

Solving BeanCreationException: Error creating bean with name 'entityManagerFactory'

I've lost quite some time on this error recently : Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is java.lang.AbstractMethodError: org.hibernate.jpa.boot …

Read More

AngularJS console debugging tips + pre-commit hooks

Just some handy accessors for the brower console : var myScope = $('#directive > select.or').scope() var $rootScope = $('body').scope() // if has the 'ng-app' attribute var myController = $('#directive > select.or').controller() var injector = $(document.body).injector() var myService = injector.get('myServiceName') And there are 3 handy pre-commit hooks : - repo: local hooks …

Read More

God I hate Java Regex API

Pourquoi, mais pourquoi faut-il 3 lignes en Java pour juste extraire un groupe d'une expression régulière qui "match" ??? Matcher matcher = Pattern.compile("o?k(b|i)s+").matcher("kiss"); matcher.matches(); assert matcher.group(1) == "i"; En Python: assert re.match("o?k(b|i)s+", "kiss").group(1) == "i …

Read More

Django tips & tricks

I recently worked on a short website project using Django & Heroku. It was my very time using this Python framework, and I really liked it ! This is a compendium of tips & tricks that I, as a Django beginner, found quite useful : Django enhanced shell To install it : pip install django-extensions …

Read More

Convert source code to PDF with syntax coloring

Sometimes, it's useful to print some source code on paper. And PDF is a very common file format, that you can be sure your printer will accept, and that will let you preview the final page layout. But how to quickly perform syntax-coloring and export to PDF ? I've been experimenting …

Read More

Cross-browsers testing : zuul or sauce-tap-runner to replace testling by SauceLabs ?

Since July 2014, Substack great cross-browsers testing tool testling has been unavailable. Today I was looking for an alternative to use with ecovoit, my carpooling search engine. Saucelabs is a very interesting solution, and is free for open-source projects. Now I found 2 tools to easily launch your Javascript TAP …

Read More

Replicating PHPSESSID and srctoken session authentication with mitmproxy

A month ago, I wanted to automate queries to a website that is using the PHPSESSID cookie to keep track of sessions. I struggled a lot and couldn't find any documentation covering the behaviour I was observing. But yesterday I finally found a solution ! In hope it could help others …

Read More

Python 3 non consistent set & dict iteration gotcha

Consider the following Python expression: print("".join(set("ABCDE"))) What do you think it produces ? Not necessarily "ABCDE". Right, but you would expect the result to be consistent, isn't it ? $ for i in {1..3}; do python2.7 -c 'print("".join(set("ABCDE")))'; done ACBED ACBED ACBED Great ! ... But with …

Read More

Mimicking testling HTML rendering of TAP javascript tests

This post is only relevant to you if you use browserify. For a good introduction to this powerful Javascript bundling tool, check this doc. First of all, I'd like to take my hat off to James Hallyday and Peteris Krumins who have built such amazing tools as browserify, testling and …

Read More

Genealogy tree visualization with d3.js

I'm happy to introduce you with genealogic-d3, a Javascript visualization library to nicely display genealogy trees that I've been working on during the past 3 days. I'm quite satisfied by the result. You'll find a live demo you can play with at https://chezsoi.org/lucas/genealogic-d3/skywalker.html I …

Read More

Fun with Javascript string obfuscation

Inspired by this tweeter post by Marcus Lagergren and the JS1K competition, here is a valid Javascript code snippet for you obfuscated code lovers: ー=!+[]+!+[]+!+[]+!+[],ߺ=ー+ー,ǀ=ߺ+ߺ,ꓹ=!+[]+[],ǃ=!+[]+!+[]+!+[],ᚐ=ꓹ[+[]],ꓹ=ᚐ+ꓹ[ǃ]+(![]+[])[ǃ]+ᚐ,ᚐ=/,/[ꓹ]+[],ꓹ=ǀ+ߺ+!+[]+!+[],ꓹ=ᚐ[ǃ]+ᚐ …

Read More

Setting-up Etherpad in a server subdirectory -aka- Apache config hell

I truly think Etherpad is an amazing piece of software. Not so much for its code base quality than for its extraordinary range of usages. Now, while I'm still unsure if todo-lists are useful or a complete waste of energy, I'm convinced that keeping a developer logbook / diary / journal has …

Read More

Bash remote code execution vulnerability

Just relaying the information about this "ShellShock" vulnerability: RedHat security blog post the full disclosure on seclists.org This seems to affect Apache, sshd, DHCP clients and even potentially git. TL;DR here is how to check your Bash version env x='() { echo Never called; }; echo YOUR BASH IS VULNERABLE …

Read More

Quick stats on a stream of values in the console

I often find myself grep-ing for information in system or application log files. And often, by combining pipes, I end up generating a flow of values that is sometimes difficult to interpret. In this post I'll show you a quick-and-dirty but handy solution to get basic statistical quantities from …

Read More