Elixir/Phoenix VSCode snippets

Here's my current Elixir VSCode snippets elixir.json file.

You can add it to VSCode by Ctrl/Cmd+Shift+P and choosing Preferences : Configure User Snippets, then opening elixir.json. If you don't have one yet, you can create a new snippet file in the...

Allow Erlang/Elixir to open ports 80 and 443

By default users other than root cannot open ports below 1000, for security reasons. If you want to - say - run your website in Elixir without nginx on port 80 or 443, you can allow the Erlang binary to open ports below 1000 using setcap (run as root):...

Manjaro 5.10 Kernel will not boot

If - like me - you get stuck on boot after Manjaro updates to Linux Kernel 5.10, the solution is pretty simple:

  1. Boot into 5.9 (you can choose the option in the grub boot menu
  2. Reinstall the 5.10 kernel with:
    sudo pacman -S linux510
  3. For good measure,...

Automatic enum values conversion in Elixir

One annoying detail about web forms is that on submission (unless you are using changesets) all the values come back as strings. This forces you to have to handle the correct formats before, say, passing those params into a service module to execute...