Posts

Andrei doesn't write a lot, but when he does it's a bunch of small
and interesting tidbits of problems he had to solve.

Experimenting with graph databases with Memgraph and Elixir

I had a conversation with Marko Budiselić, the CTO at Memgraph, during this year’s DORS/CLUC conference. We discussed graph databases in detail and explored their capabilities and applications. Since I had no prior experience with graph databases, I found the discussion fascinating. As an enthusiastic user of Elixir, I was especially curious about the possibility of integrating Elixir with Memgraph and using its features within the Elixir ecosystem.

Empty values and Ecto changesets

This week I got a very weird bug report - the API action was not saving an update to the record with a user with limited rights. For this example let’s say that this role can only change the value of a record and not anything else. Frontend will always send all params of a record but only the value will change.

Validating Phoenix params with Ecto

When all you need is a quick way for validation Phoenix params (either query or body) sometimes including a library1 is too much, especially for smaller projects. Today I’m going to go thru a very simple way of creating a validation schema, using it in a controller, and rendering the error in the view. None of the ideas in this post are really new2 but I didn’t find a full write up of this approach.

Deploying Phoenix apps on bare metal

I run a couple of internal and public applications written in Phoenix on our infrastructure. While services like fly.io exist and are amazing, sometimes it’s both cheaper (and more secure) to run small internal applications on your own hardware. It’s certainly more fun. Thru the years I’ve developed my own process of deploying the application and this post will document the current procedure.

Getting elixir-ls to work with Erlang OTP 25

Currently elixir-ls dialyzer does not work with OTP 25 and you can either downgrade to OTP 24 and wait for the fix, or build your own version of vscode-elixir-ls.

ULID + Ecto - a talk

Slides to the talk I gave at Elixir Zagreb user group are here in PDF format. Thanks for coming to my ted talk and watch this space for corrections and other notes as well! See you in September!

Running your own name server with NSD

I wanted to run my own Name server forever now. Since I’ve started self hosting this was on my todo list. This weekend I’ve decided to do just that and started with a VM on OpenBSD Amsterdam. Once you have a VM and you SSH into it you can start setting up everything. Zones and domains I had a 0x7f.hr ready for me to use so I’ve picked that up. Let’s start by preparing our zone file.

Unbound on OpenBSD

This is a simple guide on how to get Unbound running as a forwarding and local DNS server on your network. Just install a base OpenBSD installation, and drop to shell after first boot. Be sure to setup so that the VM has a static IP on your network. For me that’s 10.10.0.145.

Did you ever lose this in JavaScript?

A few days ago I’ve asked my team a trick question – what will be logged in this code example:

GnuPG