# Contributions to Matrix [Matrix](https://matrix.org) is a protocol for secure decentralized communication, that provides a fairly easy to use JSON/REST API for application developers. Currently it's mainly used for chat using [Riot](https://riot.im), but the protocol is quite versatile and can be used in many different ways like [blogging](https://github.com/lukebarnard1/journal), communicating with [home assistant](https://www.home-assistant.io/components/notify.matrix/), IOT control, [virtual reality](https://www.youtube.com/watch?v=mGDaQQlXrLA), ... The community around Matrix is pretty strong, and many people have created alternative clients, and bridges for synchronizing other chat platforms (IRC, Slack, Mattermost, Telegram, Discord, ...) with Matrix. Progressively Matrix is becoming the one chat platform to rule them all. ## Contributions You can find [my contributions here](https://github.com/pulls?utf8=%E2%9C%93&q=is%3Apr+author%3ACromFr+user%3Amatrix-org+). Note: you need to have a Github account, otherwise it will show a 404 error. ## For the Fun - [Doge bot - much wow](https://github.com/CromFr/matrix-doge-bot). Speak doge and enter.
# Fan controller
![](/img/lowres/fan-controller-1.jpg) ![](/img/lowres/fan-controller-2.jpg) ![](/img/lowres/fan-controller-3.jpg) ![](/img/lowres/fan-controller-4.png)
I came up with this because my gaming PC has a home-made watercooling system and its motherboard does not have any external sensor pins for the water temperature sensor. So I had 3 choices for controlling the fan speeds: 1. Always keep fans at like 70% so the water never gets too hot. 2. Control fan speed using the SSD temperature sensor (the SSD does not heat much, and is placed next to a watercooling radiator, so we can deduce very approximately the water temperature with it) 3. Find or build an external fan controller which uses the water temperature sensor Solution 1 is _barely_ acceptable. Solution 2 would require to build a custom program to get the temperatures and set fan speeds using the motherboard closed-source / non existent / even Linux can't / _they're lame_ APIs. So I designed a small board around an __Arduino nano__, that can take __multiple temperature inputs__ from external sensors (Water and Air), and __adjust fan speed__ accordingly using a simple __temperature/speed curve__. I also put a small __screen__ (_SSD1306_) to display all those information, a button to force high / low / auto fan speeds, and an __alarm__ if the temperature reaches critical values (or sensor is disconnected / short circuited). Since then I can barely hear my PC, even during intensive tasks :) ### Skills - PCB design - Some C++ programming on Arduino ### More - Github page: https://github.com/CromFr/fan-controller
# Hackathon with _Reporters sans Frontières_ Ask me personally if you want to learn more about it (there are some parts I can't disclose here due to privacy reasons).
# _Harden your code_ course
![](/img/hardenyourcode-1.jpg) ![](/img/hardenyourcode-2.png) ![](/img/hardenyourcode-3.png)
In 2017 I have a 2-hours course at ISEN Brest with the Electronics Club, to introduce students to __Quality Assurance__ and __Test Driven Development__, with a __language agnostic__ approach. ### Course topics: - __Quality Assurance__ definition - __Unit testing__: Good practices, test driven development, unit tests as documentation - __Coverage analysis__: examples - __Contract programming__: in/out checks, invariants - __Continuous Integration__: auto testing, online coverage analysis, contribution process on some open source projects (ie: PR merge checks) - Misc: stubs / mockups, exception vs assertion, compiler and language tooling, static / dynamic code analysis, fuzzing, code verbosity / factorization, code formatting, profile-guided optimizations ### More - All slides (English): https://cromfr.github.io/course-hardenyourcode
# Neverwinter Nights 2 related stuff ## Library for parsing game engine files (nwn-lib-d) - Parsing and serialization of GFF files, a general purpose, tree-like binary storage format. + __Profiling and optimizations__. There are currently two version of the parser: one read/write that may be slow as it instantiates all data structures in memory, and the second one which is read only, very fast and memory efficient as it only crawls over the file without allocating memory. Some work is in progress to make the second read/write. + Keep the structure of the stored data as is (other existing parsers reorder elements). Checksum of the binary file should not be modified if the file is not changed between parsing and serialization. - __Reverse engineered__ [TRN.ASWM data](https://gist.github.com/CromFr/104bac52dc9191099d9d9e3dbd2c4975), a structure containing compressed 3D mesh with pathing information (pathfinding pre-calculated data, foot step sounds etc.) - Other NWN2 simple data structures like TLK (translation tables), ERF (tar-like archive), and FoxproDB (used by NWN2 as a persistent key/value database) #### Skills - D language - __Reverse engineering__ binary files - __3D model generation for visualizing__ map information (shape, face junctions, face properties, pathfinding data, ...) - __Profiling__, __optimizations__ - Heavy __unit testing__, __coverage analysis__ #### More - Repository: https://github.com/CromFr/nwn-lib-d - Status: [](https://travis-ci.org/CromFr/nwn-lib-d) [](https://codecov.io/gh/CromFr/nwn-lib-d) - Reversed spec for TRN.ASWM format: https://gist.github.com/CromFr/104bac52dc9191099d9d9e3dbd2c4975 ## Account manager
![](/img/lowres/lcdaaccounts-1.jpg) ![](/img/lowres/lcdaaccounts-2.jpg)
It's a big project aiming to provide to players a __web interface and an open API__ for managing their server account and browsing characters. It makes heavy use of my _nwn-lib-d_ library to extract information distributed across ~300MB of various game files as fast as possible. The backend is written in D, using the Vibe.d web framework and nwn-lib-d parsing library (the main reason being that D is a good prototyping language, and is fun to write :) ). The frontend is (mostly) written in Typescript using Angular5, MaterializeCSS (JS, JQuery, SCSS) - Provides a way to access player's + Characters * Basic information * Quest status * Dungeon completion * ... * Public status to share characters infos with other players * Custom notes + Account settings * Authorized application (token-based) * Password change - __Authentication portal__, similar to OAuth (OAuth2 compatibility is a milestone) - Cache system & rate limiting to prevent from DOSing the service. - Localization using the NWN2 translation files (TLK). #### Skills - D language, with Vibe.d web library - Frontend design, with Angular / MaterializeCSS - plus the skills detailed in nwn-lib-d #### More - Repository: [Frontend](https://github.com/CromFr/LcdaAccounts) [Backend](https://github.com/CromFr/LcdaApi) - Production frontend: https://account.lcda-nwn2.fr (French) + Character example: https://account.lcda-nwn2.fr/Crom%2029/vault/krogar (French) - Production API: https://api.lcda-nwn2.fr/ ## Server infrastructure The previous server was hosted on a Windows XP machine, behind a home connection. Since the OS was aging (understand _utterly out of date_), and most software do not run anymore on the platform (and the lack of decent remote control / automation), I decided to setup a brand new server running __GNU/Linux__, with a __light windows virtual machine__ just to run the game server (the game server only runs only under Windows, and require DLL injection support for plugins, which puts Wine out of the game). ### General - Dedicated server hosted on Kimsufi (OVH) servers (low budget / second hand servers) - Ubuntu 17.04 (LTS) host system (when created) + MariaDB used by nwn2server + LcdaApi and LcdaAccounts services + Automated nwn2server updates + Automated player data & server __backup__ + Other web services like a [Wiki](https://wiki.lcda-nwn2.fr/), LcdaAccounts, LcdaApi, ... - __KVM Virtualization__ + Running only the nwn2server process, on Windows Server 2012 + __VirtIO__ for fast network and disk access + __SPICE remote control__ only accessible through a SSH tunnel - __Automated setup__ using Ansible ### Ansible Since Kimsufi services does not provide disk redundancy nor KVM (Keyboard/Video/Mouse) access to the machine (they are the cheapest dedicated servers available), the setup is fully automated using Ansible scripts. In case of a disk failure, the server can be reinstalled in a __few hours__ (mostly spent on Windows guest setup & updating), and backed up data can be restored quickly. #### More - ansible-nwn2server repository: https://github.com/CromFr/ansible-nwn2server (Note: LCDA-specific scripts are kept in a private repository) #### Skills - Server administration - __Ansible__ automation - __Optimized virtualization__, __Nested KVM debugging__ - Windows server administration :( (We needed DLL injection support for the nwn2server, which isn't supported by either Wine or ReactOS)
# Rhum roll !
![](/img/lowres/rhumroll-1.jpg)
A funny one-day project. I built a __conveyor belt__ actioned by a small reduced __DC motor__, controlled by a raspberry PI (with a H bridge for power separation). Every 3 hours, the bottles rotate for about _3 π / 4_, so my rhum is gently blended and get a __better__ _taste_ __faster__ :) ### Skills - PCB design & some basic electronics - DIY: the conveyor belt is made of tire inner tube ### More - Not much source code, since it's mostly electronics - If you insist, here is the bash script: `echo 1 > /sys/class/gpio/gpio$PIN/value; sleep 10; echo 0 > /sys/class/gpio/gpio$PIN/value`
# D Language The [D language](http://dlang.org) is a recent language much similar to C++ in term of features, but with a much cleaner syntax. I love D because it makes possible to write nice and robust applications within a very short time. Here is some small projects I have done using D: ## Served
![](/img/served-1.png) ![](/img/served-2.png) ![](/img/served-3.png)
Served is a __lightweight file-sharing web service__ (a bit like _Google Drive_) written using the web server library [vibe.d](http://vibed.org). It is designed to be __quick and easy__ to deploy. Its default configuration serve folder given by command line and uses UNIX users/passwords (via __PAM Authentification__) to upload/view files respecting file permissions. By default, the file named `index.md` gets rendered atop of the file list. ### More - Source code: https://github.com/CromFr/Served - Demo: http://served.thibautcharles.net - Design: + Bootstrap + JQuery + Markdown rendering with Showdown + Interfacing D lang. with C library (PAM) ## NWN2 Log web access
![](/img/nwnlog-1.png) ![](/img/nwnlog-2.png)
The goal was to provide a common __web interface__ to __browse and search log__ entries written by the Neverwinter Nights 2 server _La Colère d'Aurile_. These entries are written in different files/databases, use different syntaxes and timestamps relative to different time zones. The log viewer has been written to be as easy as possible to extend and maintain: If you want to add a log page, you just have to write a class. The menus, the interface, the search parameters, and the instantiation is __auto-generated at compile time__. ### More - Source code: https://github.com/CromFr/NWNLogViewer - Design + REST API generating Json data + Search & data-binding using AngularJS + Much code generation using D meta-programming features ## NWN2 GUI viewer
![](/img/nwngui-1.jpg) ![](/img/nwngui-2.jpg)
Neverwinter Nights 2 lacks of third applications. This one __renders NWN2 GUI__ without launching the whole game, and updates itself on file change. It allows the developer to write the XML code for the GUI with his favorite editor, while seeing the result in real time in another window, with extra debugging informations that NWN2 doesn't provide. Right now it has some quirks on text alignment and font handling, but the result is still close to the in-game rendering. ### More - Source: https://github.com/CromFr/NWNGuiViewer - Design: + GTK 3 with GTKD wrapper for D lang. + Hand-made XML parser ## Phobos Phobos is the standard library of the D language. I have fixed a few bugs in the library, and I am looking to fix more of them in the near future :).
# Ludum Dare 32
![](/img/ludum32-1.jpg) ![](/img/ludum32-2.jpg)
Ludum Dare is an online community best known for “Ludum Dare”, the Accelerated Game Development Event of the same name (also called a “Game Jam”). For the Ludum Dare 32 (April 2015), _Thomas Abot_ and I developed a little game on the theme _"An Unconventional Weapon"_, using the Unity 3D game engine. >Adventurers are coming to get your treasure, you are controlling your ultimate weapon to protect it : the Boss. > >You are controlling the Boss and you need to end up with as much waves of enemies as possible. To help you, you can place walls to block enemies, traps (who can be activated by clicking on it) to damage enemies, and hire goblins to help you (but beware not hurting them!). You can get gold by killing enemies (by attacking them or by activating traps while enemies are on it). > >How long will you resist ? ### Used skills - Unity 3D game engine - C# - 48 hours of intense game jam coding ♥ ### More - [Ludum Dare page](http://ludumdare.com/compo/ludum-dare-32/?action=preview&uid=51321) - Source: https://github.com/LD32-Tutti/Tutti
# Akadoc A game project started with friends, that was far too ambitious and got abandoned.
![](/img/lowres/akadoc-1.png) ![](/img/lowres/akadoc-2.png)
### More - Repository: https://git.thibautcharles.net/akadoc/akadoc - Game design documents: https://git.thibautcharles.net/akadoc/specs/src/branch/master/archives (French) ### Skills - Game design - Unity engine - C# scripting
# Tempest Autonomous sailboat
![](/img/lowres/microtransat-1.jpg) ![](/img/microtransat-2.jpg) ![](/img/microtransat-3.jpg) ![](/img/microtransat-4.jpg)
My 4th year project at ISEN Brest was the development of an __autonomous sailboat__, in order to participate in the Microtransat in few years. ### Microtransat The Microtransat Challenge is a transatlantic race of fully autonomous sailing boats, measuring less than 4 meters. This race was created in 2006 and no one has ever succeeded, with 7 trials from university and engineering school teams. The goal of ISEN Brest is to participate and win this race in 1 or 2 years. ### Our work We (_Thomas Abot_ and I) were charged to work mainly on the software part: receiving processed sensor values to make some decisions, and send command values to the servo-motors. Actually we worked on the full stack from hardware choice, interfacing, data processing to the boat intelligence and networking. The boats embeds a _Beaglebone Black_ card (similar to the Raspberry Pi, but more hardware-oriented). We also designed the electronic add-on for the Beaglebone to connect the different sensors and actuators. This project had many challenging (understand interesting) parts: - Design a socket interface so the hardware acquisition can be developed independently from the intelligence. - Provide a modular simulation web interface to test and debug the program as much as possible. - Wind optimization: the boat goes faster windward than downwind. - Tacking: The boat cannot go directly upwind, and the program needs to handle this correctly. - Fixing the kernel PWM drivers that had a bug preventing to generate more than 2 PWM. - Find solutions for: + Cable jamming around the servo-motors. + Van design, placement and electronics. ### Used skills - Interface sensors and actuators with the program - Defining sail boat intelligence - D Language - Cross-compiling D code using GCC/GDC - Inter-process communication ### More - [Source code](https://github.com/ISEN-TempestProject) - [Presentation slides (fr)](http://thibautcharles.net/slides/voilierautonome-pres/index.html) - [Report (fr)](/res/tempest.pdf)
# Courses on Git
![](/img/gitcourse-1.jpg)
In 2013, I gave 3 courses of 2 hours on Git, a version control system (like Subversion, Mercurial, ...) at ISEN Brest, for voluntary students and teachers. This course aims teaching the use of Git in collaborative projects, from the basis (add, commit, push, pull, ...) to more complex things (branch, merge, conflicts, stash, ...). ### More: - [Material (fr)](http://thibautcharles.net/coursgit/)
# Arcade console
![](/img/bornearcade-1.jpg) ![](/img/bornearcade-2.jpg) ![](/img/bornearcade-3.jpg) ![](/img/bornearcade-4.jpg) ![](/img/bornearcade-5.jpg)
In 2014, I worked on an arcade gaming console with the Electronics Club of ISEN Brest, that is available to students in school. I worked on the 3D Design, structure cutting/assembling, Archlinux configuration and development of the game selector. ### Used skills - DIY - Solidity-constrained design - ArchLinux configuration - Development of the game selector in D ### More - Game selection software (OpenAGS): https://github.com/Club-Elec/OpenAGS
# Portfolio / Online CV In 2013, I decided to put online a detailed personal presentation website in addition to my CV. It allows me to detail precisely each project I've done since I began programming. ### Used skills - Website design (inspired from GNOME Shell 3) - HTML5, CSS3/SCSS, Javascript, PHP - Update 2015: - Removed PHP (yay!) - Using [EmberJS](http://emberjs.com/) - Articles rewritten in Markdown ### More: - Source code: https://git.thibautcharles.net/tcharl/onlinecv/
# 3D Printer In 2013, I assembled a 3D printer kit, with the Electronics Club of ISEN Brest. This was a [RepRapPro Mendel monocolour](http://www.reprappro.com/products/mono-mendel/) Presentation video (fr):
### Used skills - DIY - Patience, rigor
# Quad-copter In 2012, with the Electronics Club of ISEN Brest, started working on a radio-controlled quad-rotor drone.
![](/img/lowres/drone-1.jpg) ![](/img/lowres/drone-2.jpg)
This project implies everything from electronics and low-level programming to higher level software for the stabilization : we didn't want to build a kit, our goal was to build everything from scratch. ### Used skills - DIY - Electronic card development - Brushless motors control - ARM development in C++ aimed for raspberry Pi and for STM32F4 (bare metal) - TCP/IP network communication - User interface with Qt 4.8 - Presentation of the quad-copter at open days ### More - [Source code](https://github.com/search?utf8=%E2%9C%93&q=Aerodrone_+user%3ACromFr&type=Repositories)
# ConfigFile Parser After having needed many times a C++ library to parse configuration files, I decided to write my own, using design advice from the [The Little Manual of API Design](http://www4.in.tum.de/~blanchet/api-design.pdf) The goal was to define an easy to use and extensive library, and post it to GitHub as a "real" project (readme, licencing, ...). ### Used skills - C++ library design ### More - GitHub Repository: https://github.com/CromFr/ConfigFile-parser
# 3D Engine In 2012, after working on MatrixRun with Irrlicht, I decided to study and write a sample 3D engine using OpenGL It only handles basic forms, like cubes and height maps (defined in text files), and chain renders the scene, respecting relative positions.
![](/img/3dengine-1.jpg) ![](/img/3dengine-2.jpg)
### Used skills - Source code study of Irrlicht - OpenGL 2 API - C++ Dev.
# Burger Quizz
In 2012, I realized a web-site with another student, in order to play BurgerQuizz, a game from a French TV Show. This project was realized after the courses on Apache/PHP/SQL in the second year at ISEN Brest. ### Used skills - Development of a website (HTML5/CSS3, Javascript, PHP, MySQL) - Development of a user interface to edit the database in Java - 30-day project with a deadline - Version control with SVN ### More - [Demo (French)](/redirect-burgerquizz)
# MatrixRun In 2011, I worked on a 3D video game project, controlled by wiimotes, and detecting the player position with IR diodes. --- It has been inspired by [WiiDesktopVR from Johnny Chung Lee](http://johnnylee.net/projects/wii/). The goal of this project was to discover the possibilities offered by the wiimotes and this 3D simulation and to make a game with it. Johnny Chung Lee project:
[![View on youtube](/img/lowres/matrixrun-wiidesktopvr.jpg)](https://www.youtube.com/watch?v=Jd3-eiid-Uw)
The game goal is to progress with a ship in a tunnel, avoiding obstacles and killing enemies The ship movements are controlled by the head of the layer, and the guns by two wiimotes held by the player. In-game video : Random tunnel generation, player movements and fire
### Used skills - Rigor in code writing, object-oriented model design - 3D engine use : Irrlicht - Common interface driven input/output - Random tunnel generation, by defining each polygon - Particle system (for visual effects like explosion and smoke) : Spark Particle Engine - Game presentation in ISEN open days, and in some local events ### More - Source code: https://github.com/CromFr/MatrixRun
# NavalWars
In 2011, I realized a console battleship game with another student, written in C. This project was my first software project as part of a team, and started my passion of computer sciences. ### Used skills - Writing a program in a team - 5-day project with a deadline - AI design and implementation ### More - Source code: https://github.com/CromFr/NavalWars
# La Colère d'Aurile Since 2009, I am in the development team of _La Colère d'Aurile_, a French persistent role-play/action server on Neverwinter Nights 2 based on the pen&paper role playing game Dungeon & Dragons. ## Neverwinter Nights 2
![](/img/lowres/nwn2-1.jpg) ![](/img/lowres/nwn2-2.jpg) ![](/img/lowres/nwn2-3.jpg)
Neverwinter Nights 2 is a role playing game based on the universe and rules of Dungeon and Dragons 3.5, developed by Obsidian in 2006, following the first of the name. This game offers - in addition to a solo campaign - an online multiplayer mode, with a nice editor that allows to create custom content and host in on a personal server. The editor is quite powerful, and allows to create 3D maps, dialogs, compiled scripts (in a C-like language), ... and the environment around it is free enough to add custom 3D models, ingame UI or change the core rules of the game (races addition, class addition, spell modification, ..). Some developers have even found a way to execute C# program on the server-side through pipes with the server process, allowing for example to do SQL requests. ## _La Colère d'Aurile_
![](/img/lowres/lcda-1.jpg) ![](/img/lowres/lcda-2.jpg) ![](/img/lowres/lcda-3.jpg)
_La Colère d'Aurile_ is a public persistent server, launched in Avril 26 2008. Since 2012, I am the administrator charged of development and integration. ### Used skills - Team development of the server - Handling a non-professional development team (objective attribution, priorities, ...) - Creation of maps, scenarios, dialogs, quests, monster balancing, ... - Development tools setup : Git, Continuous integration by hook scripts - Design and management of a MySQL Database ### More - [Web site](http://lacoleredaurile.xooit.fr/portal.php) - [Remapping](https://www.youtube.com/watch?v=n8AqZzG1_1M) - [Experiments with powder barrels](https://www.youtube.com/watch?v=yVMEmEEtULQ) - [Dialog UI redesign (with my own drawings!)](https://www.youtube.com/watch?v=gEHg1zyRMSo)