Saving a link field is quite different from saving a text value in drupal 8. here's how its done.
Populating geolocation field programmatically in drupal 8 is different from normal field values. This snippet does the trick:
When using content moderation, the view_unpblished module does not work. But I really needed to get a user role to see all nodes created of this type and have access to it. With the following snippet, I fixed this. 
Sometimes you forgot to uninstall a module when you removed it. To keep thing clean, uninstall the module using the following drush script.
A thing that is very nice about drupal 8 is the flexibility of views In this tutorial, a snippet about how to show a 'total' count of results of some number fields of a table.
I encountered a problem while working on a big migration. The client wanted to reuse files and images, so I added entity browser functionality. The problem however was that views does not provide a preview image for files. Therefore I created a small module.
When importing tags, or when in development, you would sometimes need to delete all terms from a vocabulary. This snippet does the trick for you.
Twig is the theme engine in drupal 8 sites. This snippet how to link to nodes correctly, without using preprocess functions to do it.
Twig comes with quite some handy functionalities. Date formatting is an example. In this snippet an example of how to show the created date in a drupal 8 time format. 
Sometimes you need a body text that is trimmed. No need to install contrib modules.