→ elixir

All posts associated with elixir

Mocks and Elixir

Walk through example of testing in elixir using Mox. This examples walks through testing a module that makes API calls to a 3rd party client. It's a long tutorial.

elixir, mox, mocks, testing – Feb 18 2022

Cachex with Phoenix

A tutorial on how to setup Cachex within your Phoenix application. This tutorial walks through setting up a basic cache for some expensive queries.

elixir, cachex, phoenix, caching, genservers – Jan 01 2020

Elixir cond do

This blog post looks into the minor differences between using cond vs case within Elixir.

elixir, cond, filter – Aug 15 2019

Enum intersperse

Intersperse is the action of putting something in between other things.

elixir, intersperse, sorting, phoenix – Nov 24 2018

Enum sort

Some of the basics of sorting with the Enum module.

elixir, sorting, enum – Sep 23 2018

Enum with an index

Iterating over a list and knowing the index or position of that item can be useful. Especially in situations where you know you need to perform some action or update some event.

elixir, lists, enum – Sep 22 2018

Accent characters

Postgres comes with many default extensions and they have one for dealing with accent characters.

postgres, elixir, accent – Aug 25 2018

Case insensitive column

In Postgres, users can define case insensitive column by using the citext extension

postgres, elixir, ecto – Aug 25 2018

Recursion and Flat Map

Use of recursion and pattern matching in this module to create a flat map of a JSON object.

flatmap, recursion, elixir – Aug 15 2018

String concat pattern matching

I have an application that wants to print out a specific format for location data. The data will sometimes be available.

elixir, string, split, pattern, matching – Jul 15 2018

String split at

Remove a specific set of characters in a string at a specific point.

elixir, string, split – Jul 14 2018

With and else

How to use with and else statement for control structure

elixir, with, composition – Jul 14 2018

String split

Divides a string into parts based on a pattern

elixir, string, split – Jul 13 2018

Filter reject one

Creating a custom module with the ability to reject one item in a list. This module will return the final list.

elixir, map, filter, reject – Jun 02 2018

Follow on Twitter
Follow on Github