fix(antidote): corrections with antidote + more images
continuous-integration/drone/push Build is passing Details

master
flavien 2023-01-18 18:30:23 +01:00
parent 10c2bb7366
commit 893281cfab
22 changed files with 86 additions and 70 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 448 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 KiB

View File

@ -6,37 +6,37 @@ summary: "New website version with hugo framework"
categories: ["posts", "hugo", "CI/CD"]
---
## Good old CMS 💾
One of the most popular software to making websites is wordpress, its advantages are its accessibility and its many plugins.
One of the most popular software for making websites is WordPress, its advantages are its accessibility and its many plugins.
Wordpress is called a CMS (content management system) and contains a interface to administer the website, modify content and create users and manage their rights...
For a big website with many contributors it can be an good solutions, especially that the embedded editor is intuitive to use.
WordPress is called a CMS (content management system) and contains an interface to administer the website, modify content and create users and manage their rights...
For a big website with many contributors it can be a good solution, especially that the embedded editor is intuitive to use.
But it come with drawbacks, the software stack need a database and the pages are generated by the server.
But it comes with drawbacks, the software stack needs a database and the pages are generated by the server.
This last point is very important because it made the page loading much slower and the server load heavier.
Because the content is not static it cannot be cached as good as static files.
This is why I tried a new solution to made my website based on static website generation frameworks.
Because the content is not static it cannot be cached as well as static files.
This is why I tried a new solution to make my website based on static website generation frameworks.
## Push, Build, Deploy 🚀
This new way of making websites is closely related to the recent trends of PaaS and CI/CD.
The idea behind these frameworks (I used [hugo](https://gohugo.io)) is to configure parameters files (json, yaml, toml), create templates and manage the routes of your website as folder and pages as Markdown files.
The idea behind these frameworks (I used [Hugo](https://gohugo.io)) is to configure parameters files (json, yaml, toml), create templates and manage the routes of your website as folders and pages as markdown files.
The framework can then build from these files the static html files of your website.
You can understand that with this workflow, these framework are clearly made for developers and it's not over...
The framework can then build the static html files of your website from these files.
You can understand that with this workflow, these frameworks are clearly made for developers and it's not over...
The goodie behind this workflow is that you can add CI/CD jobs to build and deploy automatically your website.
The advantage behind this workflow is that you can add CI/CD jobs to build and deploy your website automatically.
CI/CD jobs are tasks who will be automatically trigger according to conditions you configure relative of the activity of your repository.
CI/CD jobs are tasks that will be automatically triggered according to conditions you configure relatives of the activity of your repository.
These tasks clone your repository and do work independently of your machine, so you can run tests as well as build and deploy software while your machine is on standby and you drink your coffee (or tea).
This is what I personally set up and each time I pushed to the main branch of the website repository, a job automatically build and deploy the website.
To finish the fact that your website is static do not only makes it really fast but also makes it cheap to host.
To finish the fact that your website is static do not only make it really fast but also makes it cheap to host.
This makes that can find a lot of PaaS services (like heroku, netlify or even github/gitlab pages) to to host your website for free!
Personally I prefer host this website by the amazing Coincoin Web Services. 😁
This makes that you can find a lot of PaaS services (like Heroku, Netlify or even GitHub/GitLab pages) to host your website for free!
Personally, I prefer hosting this website by the amazing Coincoin Web Services. 😁
## Look at the code! 🤓
[@coincoingit repo](https://coincoingit.fr/flavien/Hugo-portfolio "Coincoingit: un coincoin pour votre code").

View File

@ -6,13 +6,13 @@ summary: "An emulator for the iconic 8080 CPU."
categories: ["projects", "emulation"]
---
## Computers through microscope 🔬
I always wanted to understand more deeply the lowest level of computers so I tried to made an emulator for the iconic 8bits 8080 CPU which is one of the first CPU made by Intel.
I always wanted to understand more deeply the lowest level of computers, so I tried to make an emulator for the iconic 8 bits 8080 CPU which is one of the first CPUs made by Intel.
I had to understand how a computer hardware works in general and look at the processor documentation to reproduce the behaviour of all instructions.
I had to understand how a computer hardware works in general and look at the processor documentation to reproduce the behavior of all instructions.
I was a beginner in C programming so it was also a good way to practice a rare C feature known as function pointers.
Function pointers are variables from which you can call a function, in this case they are very useful assossiated with an array to emulate instructions.
Function pointers are variables from which you can call a function, in this case they are very useful associated with an array to emulate instructions.
The operating loop of a CPU can be simplified by this flow:
@ -24,13 +24,13 @@ C--> |modify| D[CPU State];
D--> |increment| A;
{{< /mermaid >}}
Each round the CPU fetch the value in memory pointed by the program counter and each value is an instruction from 0x00 to 0xFF.
Each round the CPU fetch the value of memory pointed by the program counter and each value is an instruction from 0x00 to 0xFF.
So you can create a function pointer array of size 0xFF in which each index is the value of the assossiated instruction.
So you can create a function pointer array of size 0xFF in which each index is the value of the associated instruction.
I wanted to emulate a full 8080 CPU based machine but because lack of time (I had to do my school projects) it only emulate the CPU.
I wanted to emulate a full 8080 CPU-based machine but because lack of time (I had to do my school projects) it only emulates the CPU.
My emulator actually pass the CPUdiag program who test if the processor operate correctly and contain a disassembler for debugging.
My emulator actually pass the CPUdiag program who test if the processor operate correctly and contains a disassembler for debugging.
## look at the code! 🤓
[@coincoingit repo](https://coincoingit.fr/flavien/8080_CPU "Coincoingit: un coincoin pour votre code").

View File

@ -8,11 +8,11 @@ categories: ["projects", "webapp", "vue"]
## Volunteering 🙋🏻‍♂️
I was part of the tutors of 42Paris campus, the tutors are student volunteers who are involved in the pedagogy of 42.
They help organize the selections, oversee inter-school events, exams and other educational projects.
They help organize the selections, oversee interschool events, exams and other educational projects.
We needed a tools to organize our activities, the app is an agenda where you can post events and subscribe to these events.
We needed a tool to organize our activities, the app is an agenda where you can post events and subscribe to these events.
There also an admin page to add students to the tutors group and define the different rights on the agenda.
There is also an admin page to add students to the tutors group and define the different rights on the agenda.
![screenshot](img/capture1.png)
![screenshot](img/capture2.png)

View File

@ -7,24 +7,24 @@ tags: ["cryptography", "Cellular automata"]
categories: ["projects", "cryptography", "Cellular automata"]
---
## An automata story 🤖
When I first heard about cellular automata (mostly through Conway's Game of Life) I was intrigued by their properties.
When I first heard about cellular automata (mostly through Conway's Game of Life), I was intrigued by their properties.
I had just seen the movie "the imitation game" by Morten Tyldum and coded an enigma machine for fun so i was in a "cryptographic" mindset.
I had just seen the movie "the imitation game" by Morten Tyldum and coded an enigma machine for fun so I was in a "cryptographic" mindset.
One of the property of cellular automata is that some rules create very interesting random sequences.
One of the properties of cellular automata is that some rules create very interesting random sequences.
Symetric cryptography algorithm based on "Vernam cipher" essentially just need the best random generator as possible.
Symmetric cryptography algorithms based on "Vernam cipher" essentially just need the best random generator as possible.
So I did some research and found the article “Random Sequence Generation by Cellular Automata” by the famous scientist Stephen Wolfram.
It definitely inspired me to apply the best cellular automata random sequence generation to a symetric cryptography algorithm.
It definitely inspired me to apply the best cellular automata random sequence generation to a symmetric cryptography algorithm.
## Under the algorithm 🔬
The algorithm use a 1D radius 4 cellular automata to generate a pseudo random number generator and apply a Vernam cipher in cipher feedback mode.
The algorithm uses a 1D radius 4 cellular automaton to generate a pseudo-random number generator and apply a Vernam cipher in cipher feedback mode.
To esure a good pseudo random generation the algorithm use hybrid CA, which means that 5 rules are alternately used to generate the CA states.
To ensure a good pseudo-random generation the algorithm uses hybrid CA, which means that 5 rules are alternately used to generate the CA states.
These rules are taken from the rules analysis “Four Neighbourhood Cellular Automata asBetter Cryptographic Primitives” by Jimmy Jose and Dipanwita Roy Chowdhury.
These rules are taken from the rules analysis “Four Neighborhood Cellular Automata as Better Cryptographic Primitives” by Jimmy Jose and Dipanwita Roy Chowdhury.
I'm pretty proud that Hope Delaney and Andrew King from Columbia University recently used my code as an example of cellular automata cryptographic implementation.
You can find their article on [medium](https://medium.com/@hopedelaney40/pseudorandom-keystream-generation-using-cellular-automata-325a4352bfe7).

View File

@ -6,33 +6,40 @@ summary: "The best Web Services of the all internet."
categories: ["projects", "cloud", "sysadmin"]
---
## Why bother to do that ? 🤔
For a long time I wanted to have my own cloud ☁️ to play and learn sysadmin and be independant of too much centralized services.
For a long time, I wanted to have my own cloud ☁️ to play and learn sysadmin and be independent of too much centralized services.
I also use the server as remote development machine, the server is much faster than machines of my school and all contenerized development avoid the "it work on my machine" problems...
I also use the server as remote development machine, the server is much faster than machines of my school and all containerized development avoid the "it works on my machine" problems...
So I built my own nextcloud based cloud, a mail stack and a gitea.
I use an LDAP directory to link nextcloud, gitea and mail in one account.
So I built my own Nextcloud based cloud, a mail stack and a Gitea.
I use an LDAP directory to link Nextcloud, Gitea and mail in one account.
For development I use the great feature of VS code "remote devcontainer" that let you develop with VS code within remote contenerized environments.
For development I use the great feature of VS code "remote devcontainer" that let you develop with VS code within remote containerized environments.
## My homelab 📡
The infrastructure is self hosted on my personal servers (hpe micro-server gen10+, raspberry pi 4) and all my services are contenerized and orchestrated with Docker Swarm.
![screenshot](img/Capture_Coincoincloud.png)
![screenshot](img/Capture_Coincoinmail.png)
![screenshot](img/Capture_Coincoingit.png)
It use Traefik as a proxy to manage all the routes to sub-domains and their certificates, when connected to the docker engine this proxy is very easy to manage.
## My home lab 📡
The infrastructure is self hosted on my personal servers (HPE micro-server gen10+, raspberry pi 4) and all my services are containerized and orchestrated with Docker Swarm.
I monitor my infrastructure with Grafana who get metrics from prometheus and traefik as well as logs from all the containers with loki.
It uses Traefik as a proxy to manage all the routes to subdomains and their certificates. When connected to the docker engine this proxy is very easy to manage.
Alerts from the raspberry pi and some cloud services are configured to warn me in case of hardware or system problem on my server as well as if my websites are down.
I monitor my infrastructure with Grafana who gets metrics from Prometheus and Traefik as well as logs from all the containers with Loki.
The server is configured for high availability with 2 redundants raid 1 bootable root partition / data partition.
Alerts from the raspberry pi and some cloud services are configured to warn me in case of hardware or system problems on my server as well as if my websites are down.
The server is configured for high availability with 2 redundant raid 1 bootable root partition / data partition.
All the important data are regularly backed up on cloud storage so my apartment can burn 🔥 without losing any data.
![screenshot](img/Capture_Traefik.png)
![screenshot](img/Capture_Grafana_Stats.png)
![screenshot](img/Capture_Grafana_Probes.png)
![screenshot](img/Capture_Prometheus.png)
## What's next ? 🔮
The backup management is pretty tricky with only containers, my goal is that for my next move (since the services will be down anyway) I migrate to a supervisor solution.
I recently installed Drone CI to get continuous integration service with my Gitea and now I discovered Harbor, a container registry service.
It will then be much easier to do one-shot incremental VM disk backups instead of a lot of not always incremental volume backups.
I cloud also separate the services and development server parts of my server and manage resource allocation more easily.
I would like to deploy it on my stack, there is no configuration for a docker swarm deployment so this will be a good exercise.
_PS: If you want a coincoincloud account with an @coincoinmail.fr address and a coincoingit access send me a request by mail!_

View File

@ -15,7 +15,7 @@ categories: ["posts", "rust", "web assembly", "programming language"]
## Start little 🐛
The current version of duckscript does not implement a lot of features. It was above all an opportunity to learn PEG parsing grammar and the basics of abstract syntax tree and interpreter.
I would have liked to add more useful features like strings, function and print, but I have certifications to pass for work.
It remains a side-project that I would like to resume as soon as possible.
It remains a side project that I would like to resume as soon as possible.
**Currently implemented:**
- number (i64), boolean

View File

@ -5,9 +5,9 @@ date: 2020-04-12
summary: "A plant generator."
categories: ["projects", "generative art", "p5js"]
---
I made a plant generator with the graphic javascript library P5js.
It use l-system algorithm to generate the branches and space colonization algorithm to generate the roots.
Generate your own 🌱 [in this page!]({{< ref "/posts/hello-plants" >}} "Hello plants! 🌱")
I made a plant generator with the graphic JavaScript library P5js.
It uses l-system algorithm to generate the branches and space colonization algorithm to generate the roots.
Generate your own 🌱 [on this page!]({{< ref "/posts/hello-plants" >}} "Hello plants! 🌱")
![A plant](img/plants_0.png)
![Another beautiful plant](img/plants_4.png)

View File

@ -5,31 +5,37 @@ date: 2021-11-19
summary: "An online pong game with chat."
categories: ["projects", "webapp", "game", "nestjs", "react"]
---
![screenshot](img/pong-wars-space-map.png)
## The last project before freedom 🏁
This project is the last of the common core of 42, after it, we can choose a specialization, start an internship and we are no longer concerned by deadlines to render projects.
This project is the last of the common core of 42, after it, we can choose a specialization, start an internship and we are no longer concerned with deadlines to render projects.
It's a big project to do with a team of 5 people which is a lot for a 42 project.
It's an understatement to say that we were in a hurry to finish this project, yet, it was the biggest project we've ever done.
## What we had to do 🔨
The goal of the project is to code an online pong game, the the most importants requirements are the following:
- be able to connect with the 42 OAuth sytem
- have a global chat as well as users created channels
The goal of the project is to code an online Pong game, the most important requirements are the following:
- be able to connect with the 42 OAuth system
- have a global chat as well as user-created channels
- channels that can be public or private and with password protection
- channels admin (the channel creator) that can mute and ban a user of his channel
- channels admin can promote users to be moderators on the channel
- channel admin (the channel creator) that can mute and ban a user of his channel
- channel admin can promote users to be moderators on the channel
- global admin that can mute user on any channel and ban a user globally
- global admin can promote users to be moderators everywhere
- channel moderators can mute and ban a user in their assigned channels
- users can add friends to easily see if they are online and ingame
- users can add friends to easily see if they are online and in-game
- users can create a game and invite another user to play
- provide a matchmaking system to find games
- users can see current games and watch them as spectators
- parameters for game creation like speed, number of points to win, bonuses/penalties to catch on the map
- user profile with pricture, with achievements, game history
- user profile with picture, with achievements, game history
- list of ongoing games and leaderboard
![screenshot](img/pong-wars-chat.png)
![screenshot](img/pong-wars-profile.png)
![screenshot](img/pong-wars-create.png)
## The technical stack ⚙️
Our technical stack was as follows:
- React as javascript frontend framework
@ -41,22 +47,25 @@ Our technical stack was as follows:
- docker swarm to deploy on Coincoin Web Services
## The challenges 🏔
I had already done some frontend projects and we had a very good frontend dev in our team so I decided to take care of the backend part.
I had already done some front-end projects but we already had a very good front-end developer in our team, so I decided to take care of the back-end part.
I learned a lot on backend design thanks to the high level structure of the Nestjs framework.
Nestjs provide dedicated abstractions and modules which embeds the best nodejs libraries for all important parts of a backend.
I learned a lot of back-end design thanks to the high-level structure of the Nestjs framework.
Nestjs provide dedicated abstractions and modules which embeds the best Nodejs libraries for all important parts of a back-end.
It is based on a very interesting modular structure that enforce good design principles like the single responsability principle and help a lot with testing too, by making the mocking necessary to good unit tests much easier.
It is based on a very interesting modular structure that enforce good design principles like the single responsibility principle and helps a lot with testing too, by making the mocking necessary to good unit tests much easier.
The only downside of NestJS is also it high level of abstraction, the framework is heavily based on decorators and the modular structure is not very easy to undestand at first.
The only disadvantage of NestJS is also its high level of abstraction, the framework is heavily based on decorators and the modular structure is not very easy to understand at first.
For some people in the team for whom it was the first time with web dev, the combo javascript + typescript + NestJS/React was pretty challenging to learn in a fairly short time but they met this challenge with flying colors 💪.
For some people in the team for whom it was the first time with web development, the combo JavaScript + TypeScript + NestJS/React was pretty challenging to learn in a fairly short time but they met this challenge with flying colors 💪.
To complete the backend I learned how to create an authentification system based on OAuth, the abstractions of an ORM like entities and the different types of relations between them as well as websockets with the pub/sub events based model for the chat and online game parts.
To complete the back-end I learned how to create an authentication system based on OAuth, the abstractions of ORM like entities and the different types of relations between them as well as web sockets with the pub/sub event-based model for the chat and online game parts.
For the devops part I provided makefiles with rules to automate the deployment based on docker containers, sadly I did not have the time to provide CI/CD pipelines.
For the DevOps part, I provided tools to automate the deployment based on docker containers, sadly I did not have the time to provide CI/CD pipelines.
To present our work to the world I proposed to host the app on my cluster (where this blog is hosted) which is based on docker swarm and traefik.
To present our work to the world I proposed to host the app on my cluster (where this blog is hosted) which is based on a docker swarm and Traefik.
![screenshot](img/pong-wars-street-map.png)
![screenshot](img/pong-wars-mario-map.png)
## play it! 🕹
The game is available [here](https://pong-wars.cyberduck.blog), if you are not 42 students you can connect with the two ghosty and capser accounts.

View File

@ -9,14 +9,14 @@ categories: ["posts", "rust", "web assembly"]
## I like cells 🦠
As a developer, I have always been drawn to the complexity and beauty of cellular automata. The simple rules that govern these systems can result in rich and fascinating patterns and behaviors.
I often use cellular automata as a basis for learning new things, I have implemented them in many different languages and frameworks, I even implemented an [encryption algorithm based on cellular automata]({{< ref "/projects/cellular-automata-cryptography" >}}) early in my developer journey. This time I decided to made an efficient game of life implementation that run in the browser to learn Rust and WebAssembly.
I often use cellular automata as a basis for learning new things, I have implemented them in many different languages and frameworks, I even implemented an [encryption algorithm based on cellular automata]({{< ref "/projects/cellular-automata-cryptography" >}}) early in my developer journey. This time I decided to make an efficient game of life implementation that runs in the browser to learn Rust and WebAssembly.
## Cutting edge blazingly fast tech stack 🚀
[WebAssembly](https://webassembly.org) (Wasm) is a low-level, portable binary code format that is designed to be executed in modern web browsers. It was developed to allow developers to build web applications that are faster and more efficient than those built with traditional JavaScript.
[Rust](https://www.rust-lang.org/) is well suited to compile to WebAssembly and is a language that is designed to be fast and efficient. It can be used to build high-performance applications that require a lot of computational power, such as games and simulations.
The combo Rust/Wasm is therefore ideal for building a high-performaning game of life implementation that run in the browser. The giant size option of the simulation would be difficult to run in Javascript especially because of memory.
The combo Rust/Wasm is therefore ideal for building a high-performing game of life implementation that runs in the browser. The giant size option of the simulation would be difficult to run in JavaScript especially because of memory.
I also used [egui](https://github.com/emilk/egui) rust graphic library as it can easily be compiled to WebAssembly and embedded in a web page.
<br>