In this article, I'll guide you to create a PWA with the Django framework. All the code for this project is available under my gitlab account. You will find in each sections links to the relevant commits to help you follow. If something is not clear or if you have …
I recently had to integrate Rollbar (a service to track errors) with a JS application. One nice thing about Rollbar is that if you provide it with source maps, it will point to you where the error is in the original unminified code.
You can use signals and a context manager to acheive this. The idea is to register a function that will raise an exeption when the alarm signal is received and schedule the alarm signal for the timeout.
importsignalfromcontextlibimportcontextmanager@contextmanagerdeftimeout(time):# Register a function …
By default, pip cache will be in ~/.pip. However, this folder cannot be cached by Gitlab. The trick is to force pip to use a folder located in the build directory with the --cache-dir option. You can then cache this folder.
Voici un petit script Python pour convertir un mail au format mbox en HTML. Pour que le script fonctionne, il faut soit que le corps du message soit du HTML (recommandé) soit que la première pièce jointe du message contienne le message en HTML.
Before creating the venv you will need to open a PowerShell terminal as root and run the commands below to allow the script that activates the virtual env to run:
cd ..
Set-ExecutionPolicy Unrestricted
Create the venv. Run in a terminal as a normal user: python3 -m venv .venv If the …
Récemment, j'ai eu besoin d'intégrer un SVG dans un template Aurelia. Malheureusement, il contenait beaucoup d'images et elles étaient toutes incluses au format base64. Cela rendait le fichier quasiment inutilisable avec de gros pâtés qui empêchent de voir le code utile et d'ajouter les attributs « Aurelia » (comme if.bind). Heureusement …