> beautiful code & photos

about <

Posts tagged: hint

MySQL: silent insecure password warning

I won't invent anything new here but I'll share a quick improvement on an answer I've found on Stack Overflow.

If you are doing batch actions and don't want to write in .mylogin.cnf file, there's the trick: use a process substitution!

$ mysqldump --defaults-extra-file=<(printf "[client]\nhost = host.rds.amazonaws.com\nuser = username\npassword = \$PassW0rd\$") \
    database > dump.sql

This also works for any other file input, like Docker env file run param:

> Continue Reading

Cross-region & cross-account AWS resources Terraform planning

Hey, it's been a while, right?

Lately, I'm leading some big changes in our infrastrure since I'm wrapping a Blue/Green deployment into another one. Uh?

Long story short: our product runs on AWS ECS Docker containers, and because we have one sub-domain per app instance, we use Apache wildcard sub-domains. Meaning a single container handles traffic from many clients/instances. We already have a Blue/Green deployment process in place but at the Docker container level, not at the client level. The idea is to entirely duplicate the whole stack (with all its flaws) and a sub-domain pointing to

> Continue Reading

JS: Singleton as a module

When you develop a NodeJS application, you probably get to work with services and as much as possible with service dependency injection.
As I worked quite a lot with Symfony lately, I wanted to be able to manage my NodeJS services as it should be, and in some case, like a database connection: a single instance for the whole script.

I quicky looked onto Internet to see how to build a singleton in JavaScript (pardon my weak skills in this language) and I quickly found what I was (almost) looking for.

Code examples provided in the different posts I've read

> Continue Reading

cURL: forward POST over HTTP redirections

Recently, I've been stuck on a Web service call that wouldn't be called as supposed to be. When having troubles with WS, it's very important to dump client request and server response.

Using cURL withing PHP, I couldn't understand why my code was building a POST request and cURL returned me a GET request instead when the URI was getting a 301 redirection.

Turned out that it was a configuration issue because the URI wasn't the right one. Thanks to the config team!

What cURL says

When curl follows a redirect and the request is not a plain GET (for

> Continue Reading

Mac: Accéder aux paramètres système du compte root

Rien de super bien compliqué, il fallait juste y penser... A la base, je cherchais comment désactiver mon économiseur d'écran lorsque je verrouille mon écran et du coup j'ai trouvé une astuce sur le net :

Pour changer les préférences du compte root, il vous suffit simplement de lancer cette commande dans votre Terminal :

sudo /Applications/System\ Preferences.app/Contents/MacOS/System\ Preferences

Hop, bon dimanche !

> Continue Reading

Supprimer BlackBerry Messenger

Depuis BlackBerry OS 5, le BlackBerry Messenger fait partie intégrante du noyau de l'OS et donc impossible de supprimer l'application... Plutôt gênante et probablement consommatrice de ressources, voici une petite astuce pour supprimer l'application de votre smartphone :


  1. Installez BlackBerry Messenger
  2. Remplacez la version existante (répondez « oui »)
  3. Redémarrez quand proposé
  4. Allez dans Options > Applications > Complémentaires
  5. Trouvez et supprimez BlackBerry Messenger
  6. Redémarrez

Avec ce petit hack, on peut enfin supprimer cette application dont l'utilité semble douteuse pour ma part.

Update: Ne possédant plus de BlackBerry, je ne peux plus vous garantir que cette procédure fonctionnera. Cet article date de

> Continue Reading