GraphViz dot: Format: “png” not recognized.

As I’ve mentioned many times, I’m a huge fan of GraphViz software suite in general, and the dot tool in particular. It’s super handy for generating graphs and diagrams out of plain text files.

Today though I came across a problem that I haven’t seen before. While trying to generate an updated PNG graph from a dot file that used to work just fine before, I got the following:

$ dot -Tpng source.dot -o destination.png 
Format: "png" not recognized. Use one of: canon cmap cmapx cmapx_np dot dot_json eps fig gv imap imap_np ismap json json0 mp pic plain plain-ext pov ps ps2 svg svgz tk vdx vml vmlz xdot xdot1.2 xdot1.4 xdot_json

That looks weird. I tried the same with a few other formats and none of them were working. A quick Google search around found the solution over at StackOverflow. All I had to do was:

$ sudo dot -c

After that, dot started working as always.

Cloud Diagrams & Notes

Jerry Hargrove – Cloud Diagrams & Notes is an excellent resource for (mostly Amazon AWS) cloud diagrams and notes. I’m sure I’ve seen some of these around, but never thought to visit the original site. To some degree, these are similar to the Julia Evans’ drawings, but are more subject specific.

Managing dotfiles with rcm

These days it is a common practices to manage, version, and share configuration files for command line tools (bash, vim, etc) via a GitHub repository. There are plenty of open repositories to study and borrow things from, as well as the tools and scripts to help one with setting things up. Have a look at the awesome-dotfiles – a curated list of dotfiles resources.

Fedora Magazine runs an article about rcm – one of the many tools that are handy for managing dotfiles.

Personally, I haven’t heard of rcm until now. My own setup went through several iterations, varying from custom scripts, to Puppet, and now to Ansible. Have a look here. By the way, my dotfiles aren’t only about the command line tools. I also keep my desktop environment configuration in there (MATE + i3).

New in PHP 7.4

New in PHP 7.4” is a quick and simple introduction into changes and new features of the upcoming PHP 7.4, which is planned for release in December of 2019. In brief:

  • Preloading (parsed source code caching)
  • Typed properties
  • Improved type variance
  • FFI (Foreign Function Interface) – a way to run C code from within PHP
  • Null coalescing assignment operator (??=)
  • ext-hash always enabled
  • Password hashing registry