MapRewire <~>: Syntactic sugar to quickly bulk rekey maps

Simple sugar to make changing keys on maps less ugly.

What’s the why? When you consume information from a lot of API’s/sources, you get data streaming in with the keys from other applications, other applications naming conventions might not fit your app.

left <~> right, left is your map from outside your app, right is the rewrite rules.

It looks a little something like this: %{"id"=>"234923409", "title"=>"asdf"}<~>["title=>name", "id=>shopify_id"]

Rewrite rules can be an Elixir List or a whitespace-separated list. They follow a format of left=>right, left is the old key, and right representing the new.

Add it as a dep: {:map_rewire, "~> 0.1.0"} ~~ GitHub

Talk: Embedded Elixir with Nerves - Code BEAM STO

My recent Nerves talk from Code BEAM STO: Want to learn more? Sign up for Nerves training at ElixirConf!

Spawning linked processes in Elixir

In this short episode, we continue exploring Elixir processes.

We build a countdown timer and another function that spawns it as a linked process. We see what happens when a linked process dies and how to handle such events without killing the parent process.

ElixirWeekly: The Elixir Community Newsletter, covering community news you easily miss, shared on ElixirStatus and the web, in one email every Thursday.



But what if you would like to clean out your mix.lock file?

You know the drill, you stumble across some tutorial to do something you’d like to add to your Phoenix app, you update dependencies, try it out, then maybe decide it’s not what you want, or worth the effort.

Read on to clean out your mix.lock file

Win a copy of Phoenix in Action

SmoothTerminal is giving away a copy of Phoenix in Action!

Phoenix in Action is an example-based tutorial that teaches you how to use the Phoenix framework to build production-quality web apps.

What I have learned working 1 year full-time using Elixir

I wrote a blog post to wrap up my year as full-time Elixir developer, hope you like it

IntelliJ Elixir 8.0.0

  • New and improved Run/Debug configurations:

    • Distillery Release CLI,
    • elixir
    • iex
    • mix
    • mix test
    • iex -S mix.
  • Evaluate in the debugger.
  • More module filtering controls for debugger.
  • Elixir 1.7 compatibility for debugger.
  • All OTP 21 bytecodes can be disassembled.
  • Spell Checking

Installation Instructions

Algorithmically Fingering Guitar Chords with Elixir

Piggy-backing off my last post on generating all possible voicings for a given guitar chord, this week I used a “sieve”-inspired algorithm to generate all possible* fingerings for a given chord.

  • For some values of “possible.”

Early Bird Pricing to GigCityElixir ends today

It’s an excellent conference season and GigCityElixir is going to make your choices even harder. We’re bringing John Hughes (one of the creators of Haskell), Chris McCord (Phoenix), Prag Dave, James E Gray II and Bruce Tate with many others to scenic Chattanooga.

ElixirWeekly: The Elixir Community Newsletter, covering community news you easily miss, shared on ElixirStatus and the web, in one email every Thursday.

Performing Bulk Updates using Ecto and Elixir

Performing bulk updates with Ecto and Elixir can be a pain. I compare three ways that you can do them.

A Proposal: Elixir-Style Modules in JavaScript

Organizing our Elixir code into modules, with related structs and functions all in one place, is great. Why not do that in JavaScript too?

Cognitex - Library for managing user acounts through AWS Cognito service.

I have recently created a small library for managing user accounts through AWS Cognito service.


The following functionality is covered;

  • User registration
  • Confirm registration (with the confirmation code received from AWS, by email)
  • User authentication
  • Fetch user data by an access token
  • Fetch user data by username
  • Change user password
  • Update user attributes
  • Reset a forgotten password

Link to project

Elixir Cowboy Websocket Handler

For my side project Gossip, I wanted to have a websocket connection for non-Phoenix connections. To do this I used Cowboy to create a socket handler.

Control one process with another (challenge solution)

Solution to Processes Challenge 1: Control one process with another

The challenge from last time was to create a module with two spawnable processes. One process is a counter and the second is a controller that spawns, starts it and terminates the counter.

Elixium - A fast, anonymous, and scriptable blockchain written in Elixir

Win a ticket to The Big Elixir Conference

SmoothTerminal is giving away two tickets to The Big Elixir conference in New Orleans, November 8-9!

I’m a keynote speaker (first time!) so I’m super excited to meet up with people there and see old friends!

Generating Excel Friendly CSV Exports with Elixir

Microsoft Excel and CSV don’t always play nicely together, especially when there’s non-ASCII characters involved.

Here’s an overview of how to generate CSV files that work well with Excel:

The simplest Elixir process example

This screencast is an intro to Elixir processes. First we make the very simplest example of Elixir processes possible, and then we build on it.

The episode covers how to send, receive, spawn and kill Elixir processes.

Simplify Your Phoenix Controllers with action_fallback

In this episode we’ll look at one way to simplify an existing Phoenix controller using Phoenix.Controller.action_fallback/1

How to mock HTTPoison in Elixir?

In this article, I’m showing how to use MOX library to simulate HTTPoison behavior and how properly mock HTTP client in your tests.