Notes to self

Browsing...

Implementing a custom ExUnit assert to test PDF output

Making a custom assert can clean up and DRY your tests. Here is how I refactored a few ExUnit tests to use a single assert to test PDF output.

Ecto embeds have IDs by default

When you use Ecto’s embeds_one to embed another schema backed by JSONB, Ecto will assign an ID and complain if you try to replace this embeded record without it.

Converting snake_case keys to camelCase in Elixir

Converting a snake_case map keys to camelCase is a pretty common task in the snake-case-style languages working with the JavaScript frontend. Here are the basics in understanding how you can convert maps to camelCase style in Elixir.

How to solve DNS resolution in Fedora 32 Docker containers

After little trouble with running Docker in Fedora 31 I found myself yet again in a similar situation. This time the DNS inside Docker containers could not resolve github.com hostname.

Phoenix 1.5 LiveDashboard's Request Logger

Phoenix 1.5-rc.0 is out and so I fired up a new app to see what’s LiveDashboard is all about. Something that stood up for me is the Request Logger.

by Josef Strzibny
RSS