Coding

The Quantcast CMP broke my sites

A javascript error in CMP blocks my site.

Maggio 19, 2023

WP Gutenberg notes

Collection of notes and thoughts on Wordpress Gutenberg blocks development.

Gennaio 9, 2023

Optimizing LCP, Largest Contentful Paint result

Notes about Core Web Vitals optimization challenge

Gennaio 4, 2023

Find values recursively inside complex json objects in PHP

A PHP function to to quickly search complex, nested php structures for specific values.

Dicembre 18, 2022

Scroll to DIV by ID without jQuery

Use scrollIntoView instead of jQuery animate.

Dicembre 16, 2022

React links

Collection of links and notes while approaching React.js, next.js and related topics.

Dicembre 14, 2022

Come realizzare in PHP un bot per il controllo di accesso ad un gruppo Telegram

Ho raccolto in questo post una serie di appunti per la realizzazione di un bot di controllo di un gruppo Telegram, non è un vero e proprio tutorial, ma è sicuramente utile per ripercorrere il progetto.

Dicembre 9, 2022

Test page for Bright Links plugin

To test the plugin hover your mouse to a link, or tap the link on mobile device.

Dicembre 4, 2022

Updating a metabox after Gutenberg updates

When press on "Update" refresh a custom metabox under gutenberg editor.

Arduino links

Collection of links about projects and arduino community

Novembre 1, 2022

Machine learning links

Collection of links about Machine Learning topic, built while studying ml

Ottobre 25, 2022

Reti neurali, corso base (2/2)

Corso base su reti neurali, elenco slide:

Giugno 16, 2021

Reti neurali, corso base (1/2)

Seconda parte

Giugno 15, 2021

Count coloured cells on Google Sheets with reference

In a Google spreadsheet if you need to count cells based on their background color you can use this code…

Maggio 22, 2020

WP doesn’t send email? try this

Snippets for sending emails with Wordpress

Febbraio 8, 2020

Two post types share the same taxonomy in WordPress

Sharing a WordPress taxonomy between two post types is useful especially if you want to create a relation between different…

Novembre 14, 2019

MYSQL add counter in a query

Use mysql variables to create a counter in SQL, PHP code to use an SQL counter and what does the i mean in mysqli?

Novembre 9, 2019

Modify the language attribute based on category in WordPress

How to modify the language attribute in your Wordpress theme using a specific value

Novembre 7, 2019

WordPress Fatal error: Unknown: Cannot use output buffering in output buffering display handlers in Unknown on line 0

How I've beat the php mysterious fatal error unknown in Wordpress caused by caching plugin WP Fastest Cache

WordPress Gutenberg doesn’t parse Istagram oembed url

Sometimes Instagram embed doesn't work, why?

Novembre 4, 2019

Hacking del sistema di irrigazione Claber

Modificare il sistema di irrigazione della Claber per utilizzarlo con Arduino e una app realizzata ad hoc

Novembre 1, 2019

Stop sending email to new user in WordPress admin registration

A code snippet to prevent WordPress to send notification emails when you manually create new users. It uses a pluggable function.

A new avatar generator for WordPress with get_avatar and Flathash

Brand new avatars for WordPress Gravatar service

Aprile 7, 2017

3 ways to add author’s image in WordPress

Add author's image in WordPress without a plugin

Aprile 5, 2017

Orari trenord, corri solo quando ce n’è bisogno

Hai presente quando corri in stazione per prendere il treno al volo e, quando arrivi, ti accorgi che il treno ha 12 minuti di ritardo?

Marzo 30, 2017

Add Internet Explorer class to body to detect old browser

When you have clients that still uses an old browser, you need to handle it. This javascript function detects the…

Febbraio 27, 2017

Add filter on wp_title not working with Yoast SEO plugin

For SEO purposes, in a specific template that has a list of items with pagination, I need to have different…

Febbraio 22, 2017

Generate all old PDF preview images with WordPress 4.7

WordPress 4.7 generates thumbnails for PDF files while uploading them in the media library, this is a really good thing…

Dicembre 13, 2016

Highlight text for search results in PHP

Useful code to highlight text occurences in search results or in a text. How to highlight text in a string…

Settembre 2, 2016