I need to get a field type programmatically.
Search the Drupal 8 HowTo.
I need to create a new drush command.
You have a link as an url object. You need to override its attributes in a preprocess.
I needed a page where I would render custom xml. First I tried a Drupal's HTMLResponse (first snippet), but only the second snippet using Symfony's response worked for me.
Get uri from image file and style it.
You need to get a taxonomy term id by name in Drupal 8. Useful for migrations.