(1) If you hold the copyright to the GPL code, then you are not bound by the GPL license. You are free to also license that code snippet under CC-BY-whatever (dual-licensing). No formal mechanisms are needed, you can just write your blog post with the code snippets.
(2) If you do not hold the copyright, then you have to abide by the GPL license. The GPL does not allow you to publish that code snippet under a different license. Instead, you would have to:
- link the GPL code rather than including it into your blog post; or
- rely on a copyright exception so that the GPL or any other license would be irrelevant for your use (e.g. fair use in the U.S.; I'm not familiar with Italian exceptions)
Quoting a snippet from your own projects seems perfectly fine (case 1).
If those snippet include other people's GPL-covered code then you are bound by that license (case 2).
So why are CC-BY-SA 4.0 and GPLv3 considered compatible? Because the CC-BY-SA has a compatibility mechanism in the other direction: you can take something for which you received a CC-BY-SA license and use it under the terms of the GPLv3 instead. This is a one-way street and doesn't help you in this case. For CC-BY no special compatibility mechanism is needed because CC-BY is not a copyleft license, but CC-BY → GPL is a one-way street as well.