Topic: Elixir
How to work with XML documents in Elixir using xmerl
I want to parse an XML document, find an element by id, add an attribute, and export the document back to a string.
How to add CSS rules only in the test env in your Phoenix app
Certain CSS styles might cause problems in your browser-based tests, so you might want to add some CSS rules that turn off those styles, but only in the test environment.
Automated accessibility testing for Elixir web applications
Integrate Axe into your Elixir browser tests with my new library, A11yAudit.
How to format Elixir doctests?
I wrote a doctest formatter plugin to help you with that.
How to format Elixir code in Markdown code blocks?
I wrote a Markdown code block formatter plugin to help you with that.
Do not run `mix test || mix test --failed`
This popular way of retrying flaky tests on CI is a trap.
7 Gettext lessons learned after 2 years of developing a European platform
In January 2020, we grew Steady's language support from 2 to 9 languages. Those initial efforts, as well as adding new features to the platform afterwards, taught us a few good practices for working with Gettext.
The problem with Task.await/2 and timeouts
It's a common pattern to start many asynchronous tasks at once and then await each task using Task.await/2. But did you know that the timeouts can add up?
Speed up the compilation of Elixir projects that use Gettext
With those two small configuration fixes, we managed to make our Phoenix project compile 3 times faster.
Link Phoenix debug page stack trace to your editor
You can configure Plug.Debugger to generate links that open the line that caused the error in your editor.
CSRF protection in Phoenix
If your Phoenix app uses basic authentication or cookies for authentication, you need to protect it from cross-site request forgery.
How to asynchronously download files in Elixir
With either HTTPotion or HTTPoison.
Print my string, Elixir!
Not everything that presents itself as a binary is an invalid string.
How to ORDER BY the result of SELECT COUNT in Ecto
Spoiler: by using fragments to set an alias.
Hello World web app in Elixir, part 3 - Phoenix
In the process of learning Elixir I am writing the same simple web app three times, using three different tools. This is the third part - the variant using the web framework Phoenix.
Hello World web app in Elixir, part 2 - Plug
In the process of learning Elixir I am writing the same simple web app three times, using three different tools. This is the second part - the variant using Plug.
Hello World web app in Elixir, part 1 - Cowboy
In the process of learning Elixir I am writing the same simple web app three times, using three different tools. This is the first part - the variant using only the Cowboy web server.