Inertiajs Adapter for Phoenix

Just released a Phoenix adapter for Inertiajs (The Modern Monolith):

Inertia.js lets you quickly build modern single-page React, Vue and Svelte apps using classic server-side routing and controllers.

inner_cotton v0.6.0

inner_cotton is a set of static analysis of Elixir codes, and a set of mix tasks to help initializing and maintaining OSS/production codes.

Changes in v0.6.0 are :

  • Support Elixir 1.10
  • Drop Support Elixir 1.8 (It may work but not supported.)
  • rrrene/inch_ex returns
  • Moves Travis CI from mix cotton.init to mix cotton.init.travisci
  • Supports GitHub Action in mix cotton.init.github
  • Supports GitLab CI in mix cotton.init.gitlab
  • Remove fast_yaml dependency
  • Update deps

Adventures in Ecto and PostgreSQL: Partial unique indexes and upserts with associations

Article about pitfalls when handling partial unique indexes and upserts with Ecto. And dog politics.

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

Complex Unique Constraints with PostgreSQL Triggers in Ecto

I recently needed to enforce a database constraint similar in spirit to a unique index, however the criteria for what should be considered “unique” was more complex than what a simple unique index in PostgreSQL would be able to deal with. Knowing that Ecto’s unique constraint validation works by intercepting an error raised by the database, I set out to see if I could implement the complex unique constraint logic in the database and still be able to use the Ecto.Changeset.unique_constraint/3 validation without needing to modify any Elixir code.

Simple Phoenix LiveView App: Socket Session info, CSRF & .leex

Part 4 of the Simple Phoenix LiveView App series. This episode covers three things:

  • Pass connection info to our socket in endpoint.ex
  • Set up CSRF tokens for use with LiveView via sockets
  • Convert the embedded ~L template in our LiveView render function to a separate .leex file

phoenix_integration 0.8.0 pre-release

Have just merged in a great PR by @marick into phoenix_integration, which much improves form testing. Am going to leave it in master for a week before pushing to hex, so let me/us know if there is any feedback. This bumps the version to 0.8.0

ElixirConf EU 30 speakers and training announced

ElixirConf EU 30 speakers and training all live and early bird open. New website too and its hosted on github, any ideas on anything you’d like to see added?

Elixir Wizards S3E12 - Sean Lewis from Divvy on Performance and Hiring

Latest episode of the Elixir Wizards podcast out today! Check it out here:

ExARI: An Elixir Library for interfacing with Asterisk the Open Source Communications Software using ARI

ARI stands for Asterisk REST Interface. It provides a REST and websocket interface for controlling an Asterisk server. Check out the Elixir Forum post at #asterisk #voip #myelixirstatus

Shameless plug: Check out @elixirstatus' other community project:

Credo, a new static code analysis tool that acts as a code linter, but also focusses on teaching coding practices and code consistency.

Skogsrå: Simplifying Your Elixir Configuration

Once an Elixir project is large enough, maintaining config files and config variables becomes a nightmare.

This blog post shows the basics of using Skogsra to simplify your Elixir project’s configuration:

Easy Authentication in Elixir & Phoenix with the pow & pow_assent libraries

Learn how quick & easy setting up authentication can be with @danschultzer’s pow & pow_assent libraries.


Using Phoenix Presence in LiveView |> A Simple Example

In this post of Real World Phoenix I discover how easy it can be to incorporate Phoenix Presence inside LiveView

Turns ABNF into parser

Made this little thing, if anyone finds it useful

ABNF in, parser out

  • Brevity - flattens unnecessary nesting in parsed ABNF
  • Easy to config and customzie
  • Full test coverage

Make your stateful library easier to use

In my ongoing quest to convince people to stop using Application env so much, I decided to write about one of the patterns I use for making “stateful” libraries (libraries that provide processes, ets tables, etc.) more configurable and reusable.

Hades - A wrapper for NMAP written in Elixir


Simple ping scan

The snippet below ping scans the network, and lists the target machine if it responds to ping.

iex> Hades.new_command()
...> |> Hades.add_argument(Hades.Arguments.ScanTechniques.arg_sP())
...> |> Hades.add_target("")
...> |> Hades.scan()
12:19:25.739 [info]  NMAP Output: "Starting Nmap 7.80 ( ) at 2020-02-07 12:19 CET\n"

12:19:25.788 [info]  NMAP Output: "Nmap scan report for (\nHost is up (0.00045s latency).\n"

12:19:25.788 [info]  NMAP Output: "Nmap done: 1 IP address (1 host up) scanned in 0.06 seconds\n"

12:19:25.789 [info]  Port exit: :exit_status: 0

12:19:25.789 [info]  EXIT

12:19:25.790 [info]  DOWN message from port: #Port<0.14>
  hosts: [
    %{hostname: "", ip: "", ports: []}
  time: %{
    elapsed: 0.06,
    endstr: "Fri Feb  7 12:19:25 2020",
    startstr: "Fri Feb  7 12:19:25 2020",
    unix: 1581074365

Schoolbus - Manage one or more PubSub instances using the Elixir registry

Start the bus

iex(1)> {:ok, _bus} = Schoolbus.start_link([])
{:ok, #PID<0.212.0>}

Register a topic

iex(2)> Schoolbus.register(:games)

Register a namespaced topic

iex(3)> Schoolbus.register({:songs, :diplo})
iex(4)> Schoolbus.register({:songs, :tiesto})

Subscribe to a registered topic

iex(3)> Schoolbus.subscribers()
iex(4)> Schoolbus.subscribe(:games)
{:ok, [:games]}
iex(5)> self()
iex(6)> Schoolbus.subscribers()
[games: #PID<0.208.0>]

Subscribe to all topics within a namespace

iex(7)> Schoolbus.subscribers()
[games: #PID<0.208.0>]
iex(8)> Schoolbus.subscribe({:songs, "*"})
{:ok, [songs: :diplo, songs: :tiesto]}
iex(9)> self()
iex(10)> Schoolbus.subscribers()
  {{:songs, :tiesto}, #PID<0.208.0>},
  {{:songs, :diplo}, #PID<0.208.0>},
  {:games, #PID<0.208.0>}

Broadcast a topic to all subscribers

iex(11)> flush
iex(12)> Schoolbus.broadcast(:games, :uno)
iex(13)> flush

10 Killer Elixir Tips —#10

You Can also find this article on MEDIUM

Escalate your Elixir with this collection of Coding Tips.

Happy Coding

Elixir Wizards S3E11 - Paul Schoenfelder and Hans Elias Josephsen on Lumen and Performance

Episode 11 of Elixir Wizards out today! Check it out:

DateTimeParser 1.0.0 released


  • No longer converts to UTC. Converting to UTC too early could be bad. Options still available.
  • No longer assumes date or time. No information is better than bad information. Options still available.
  • Added bang variants
  • Added parse/2 that will return best match.
  • Fixed bugs
  • Calling it stable.

ElixirMix Podcast 087: Zip Generation using Packmatic with Evadne Wu

In this episode of ElixirMix, we talk with Evadne Wu about the Packmatic library. Packmatic supports zipping streams on the fly for improved performance and UX. We cover streams, Zip64, supporting a public library, and much more!

Podcast Episode