Use squid and squidGuard to redirect all URLs from a domain to another one

Posted on 2017-06-09 in Trucs et astuces • Tagged with squid, Linux

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 …


Continue reading

Require valid-user on Apache only for some request types

Posted on 2017-03-29 in Trucs et astuces • Tagged with apache

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>

Mon passage à LineageOS

Posted on 2017-03-29 in Blog • Tagged with Android, 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 …


Continue reading

Angular2 and SVG

Posted on 2017-02-21 in Blog • Tagged with Angular2, SVG

Note

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.

In an interview about a year old, Rob Eisenberg, the creator of the Aurelia framework, said:

Over a …

Continue reading

Use Unix sockets with Docker

Posted on 2017-02-15 in Programmation • Tagged with Docker, Unix

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 …


Continue reading

Extraire toutes les images encodées en base64 d'un SVG

Posted on 2017-02-13 in Trucs et astuces • Tagged with Python, 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 …


Continue reading

Logger les données d'une requête POST avec apache

Posted on 2017-02-13 in Trucs et astuces • Tagged with 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 …

Continue reading

Form validation with Aurelia

Posted on 2017-01-24 in Aurelia • Tagged with aurelia, android, mobile

Note

Update from 2017-01-25: after new exchanges with Doug Kent I was able to improve my workaround 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.

I promised some months ago that I will …


Continue reading

Trouver tous les boutons sans attributs type

Posted on 2017-01-16 in Trucs et astuces • Tagged with HTML, Python, formulaire

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 …


Continue reading

Make navigation user friendly on your Aurelia SPA

Posted on 2016-08-28 in Aurelia • Tagged with aurelia, font awesome

Add a spinner

  1. Add the font awesome files to your project (CSS and fonts files).

  2. Import the font awesome style sheet in your index.html

    <link rel="stylesheet" href="/assets/fonts/fontawesome/font-awesome …

Continue reading