mglaman.dev

Subscribe
Archives
June 23, 2023

mglaman.dev – June 23rd, 2023

Hey there!

Here's your weekly newsletter from me, Matt Glaman!

Was this forwarded to you? You can subscribe here!

My latest blog post

jq is a command-line processor for JSON. In this blog post, I use it to extract data from state values in Drupal.



Using jq with Drush to inspect state values in Drupal

Drupal has a key-value database table that stores information about the current environment. The values stored are serialized PHP objects or arrays. That makes inspecting them nearly impossible by just querying the database. Luckily, Drush provides a state:get command for retrieving those values. This command unserializes the values, making them human-readable and even in different formats. One of my favorite tricks is to format the output of arrays or objects to JSON using --format=json. You can then use a tool like jq to extract data.

Tips & tricks

Seth Godin's blog post Peer support resonated with me this week. I recommend giving it a read. One reason I love working in open source is the wide range of peers I get to work with that support me and that I can support.

This week's live stream

Retrofit now supports Drupal 7 theme hooks that use PHPTemplate templates!



Twitch

Twitch is the world's leading video platform and community for gamers.

Interesting links

  • PHP Internals Book
    • I have zero knowledge of PHP internals and found this book. It has been around a long time, but I finally stumbled across it.
  • CUPID - for joyful coding
    • CUPID is a set of properties in software that make it joyful to work with: composable, Unix philosophy, predictable, idiomatic, domain-based.
  • The Problem With APIs
    • A great dive into the design and usability problems encountered with APIs – regardless their approach (GraphQL, REST, HATEOS, etc.)

If you enjoyed this, consider forwarding it to a friend.

Have suggestions or ideas for future blog posts and newsletters? Let me know!

Don't miss what's next. Subscribe to mglaman.dev:
GitHub Bluesky Threads X LinkedIn Fediverse
Powered by Buttondown, the easiest way to start and grow your newsletter.