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 …
Use squid and squidGuard to redirect all URLs from a domain to another one
You may find yourself in a situation where you will need to redirect all URLs from a domain (lets say www.example.com) to another one (lets say www.example.org). This can be done with squid, a proxy server, and squidGuard, an …
read moreRequire valid-user on Apache only for some request types
You can use the Limit directive like this:
AuthType basic AuthName "Restricted area" AuthUserFile /var/www/passwd Require valid-user # Only GET and OPTIONS request are allowed without authentication. <Limit GET OPTIONS> Require all granted </Limit>
read moreMon passage à LineageOS
Tout d'abord, je présente un projet intéressant : oandbackup que j'ai découvert via cet article. oandbanck vous permet de sauvegarder les APK installés sur votre téléphone pour pouvoir les réinstaller une fois la mise à jour effectuée. Malheureusement, suite à un problème lors de la mise à jour, j'ai dû formater …
read moreAngular2 and SVG
Disclaimer: I use the Aurelia framework, a competitor of Angular2. I wrote several articles about Aurelia. I am not an expert with Angular2. If you spot a mistake, please leave a comment.
Update 2017-03-06: Give the solution of how to use binding with SVG attributes. Thanks NexusVI.
read moreUse Unix sockets with Docker
By default, you are supposed to use TCP sockets to communicate with your applications running in Docker. But what if you want to use Unix sockets instead? The answer is you can: you make the application create the socket file in a volume and set the proper permissions to it …
read moreExtraire toutes les images encodées en base64 d'un SVG
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 …
read moreLogger les données d'une requête POST avec apache
D'après le manuel, une façon simple de logger le contenu d'une requête POST (a priori uniquement en développement pour débugger l'application, sinon la taille des logs de production va exploser et on risque de faire fuiter des informations) est d'utiliser le module dumpio, soit pour Apache 2.4 :
# On met …read moreForm validation with Aurelia
Update (2017-07-20): aurelia-validation now supports events, so it is much easier to disable the submission of the form until it is valid. See the Disable the submission until the form is valid section for the code.
Update (2017-01-25): after new exchanges with Doug Kent I was able to improve my …
read moreTrouver tous les boutons sans attributs type
Certains navigateurs (comme Chrome) afficheront une erreur dans la console si vous avez des formulaires créés avec la balise form et des boutons sans l'attribut type. Il peut donc être intéressant d'avoir un petit script qui trouve tous ces boutons pour ajouter l'attribut type. La bonne nouvelle c'est qu'avec Python …
read more