Blog
Programming tutorials, tips and experiments, newest first.
2021
Web scraping by watching requests
Web scraping is a technique used to extract content from websites in order to archive data in a structured way. The data is extracted directly from the source code. The work consists in searching for it in a jungle of HTML tags. It is however much easier to retrieve this data in a structured format. This is possible by intercepting web requests between your browser and the website. This method works, among others, on social networks or classifieds websites (but make sure to respect their terms of use).
How to clone a PC and boot it into a virtual machine
Backing up a complete computer and booting it into a virtual machine is possible with just a few Linux commands. The tools are free and open source.
2020
Create your own i3/sway status bar with some bash and python
i3 is a tiling window manager on Linux. It supports tiling, stacking, and tabbing layouts, which it handles dynamically. The advantage is that you no longer waste time organizing your windows with the mouse. With i3 the layout is automatic. The windows open by occupying the available space. Using customizable keyboard shortcuts, you can move them around, display them full screen, arrange them horizontally or vertically. This is much more convenient and faster than using the mouse.
Svelte JS: VS Code configuration and internationalization
Svelte is a set of tools to develop JavaScript applications (yet another new JS framework). It is a direct competitor of React or Vue.js. After having tried it, I confirm that this project is to be followed with interest.
2019
Automating tasks in a virtualized OS
Or how to perform actions in a virtual machine without leaving the terminal… From Linux, I was looking for a way to automate the compilation of a piece of software on Windows, and without using Wine which is not an official Microsoft product. VirtualBox is multi-platform virtualization software. It comes with VBoxManage, a command line tool for managing virtual machines.
Web scraping with Electron
Web scraping is a technique for extracting content from websites in order to archive data in a structured way. Be careful, however, to respect the terms of use of the website concerned. Electron is a framework for creating native Windows/Mac/Linux applications with web technologies (JavaScript, HTML, CSS). It includes the browser Chromium, fully configurable. Is there a better way to code a portable application with a graphical user interface to scrape a given site?
2018
Rate limiting API requests
You have released a public API and you want to avoid abuse? It is possible to limit access to a specific number of requests within periods of time. For example, if a user sends two successive requests when you only allow one request every 5 seconds, he will get the following answer: Rate limit exceeded, please try again in 4 seconds.
Build your own Hugo website search engine
The goal is to build a static site search: without installing any JS module on your computer without indexing stop words, i.e. words like “and, or, with, the…” indexing words once per page (no duplicates) your next created pages will be added automatically, without any additional work.
2017
Solving a Rubik's pocket cube with a graph database
A pocket cube can have 3 674 160 different positions. For a “No-SQL” database, it’s a piece of cake. Neo4j is a graph database. In this tool, each node could be a cube position, and edges from one node to another could be a move.