Elixir, Atom, Fira Code Font

If you are developing in Elixir and use the github Atom code editor you might want to take a look at the Firacode Font. It has support for programming ligatures. Font changes can be fairly easily managed in Atom by installing the fonts package. That package provides dozens of possibilities for monospaced programmer fonts.

Read More

Elixir, Ecto, embeds_many

I built an internal project using Elixir and the Phoenix web framework. We use AWS and I wanted to build our own site that could quickly display EC2 instance information along with additional information that we’d gather from our deployment process. We wanted to add some initial simple functionality as well like searching within the attributes on an instance instead of just across all attributes that AWS Console provides and some various quick “copy to clipboard” type functionality that were deemed important for operations. I named the app - aws_detective.

Read More

Elixir, Ecto, Tables without "id" in Relationships

Always, always, always use an “id” as the primary key for your relational database tables where that “id” is a database sequence generated value. And if that table has a relationship with another table then make sure your column name is : “tablename_id”. This is the common wisdom in using Ecto (or really any modern relational library that attempts to help you with talking to your relational database). But although there may be many people who tell you it can’t be done any other way that information is not true and the facts are laid out in the Ecto documentation (which is really good as is the case with most of the Elixir library doc that I’ve had to read).

Read More

Elixir, ex_aws Library, Temporary Security Tokens

During a development effort where I had to use AWS API’s to extract information about our EC2 instances, the network powers-that-be wanted to just grant me temporary AWS credentials. I wanted to use ex_aws since its by far the most popular Elixir library for using AWS’ numerous API’s but I hadn’t used it with temporary security tokens before. It took a while to figure this out so I figured I’d write a short post about what I did.

Read More