Dev tips and tricks

Regex: practical developping and testing

20 Oct 2020 1 minute read 0 comments d-erf

Hello all!   You know i don't write for nothing, so here i won't cover whole regex theory, other sites does it well.   Here i want to present a great tool boosting your regex composing time.   It brings: - Didactic live regex composing - Dynamic test...

Regex: checking user ipv4 input

19 Oct 2020 1 minute read 3 comments d-erf

Hello all!   Ok, it's regex time!   Further than just ipv4 check, it uses common regex knowledge and tips.   I will present you in a coming article tools to help creating, testing and coding in regex world.   For now, here are 4 javascript regexes to...

Symfony 5 php object to array conversion

13 Oct 2020 1 minute read 0 comments d-erf

Hello all!     Today one tip (for a tip!), for automatic, correct, recursive, pain-free method to converting php object to json, under symfony 5 php framework. You know it's a common need but not so well addressed in fact, with such a simplicity, avo...

Symfony 5 php mongo odm array field

10 Oct 2020 1 minute read 0 comments d-erf

Hello,   I've been searching this information for a couple of hour, and as it's now well documented, i publish solution to prevent other people losing to much time for same need.   Mongodb odm in a symfony 5 project.   How to annotate type in Documen...

Python - execute external command and get output

20 Jun 2020 1 minute read 0 comments d-erf

Hello python devs!   Question here is to practically execute and external command like a system command, and get the output in a variable to work with.   Do do such, use subprocess import:   #!/usr/bin/env python import subprocess import pprint cm...