Building a Gitlab CI light using Elixir/Nerves - Hardware

For my latest project I describe how to build a Gitlab CI status light using Elixir and Nerves. Let’s start with assembling the hardware and turning the lights on and off!

@elixirlang @NervesProject

https://frank.kumro.io/building-a-gitlab-ci-light-using-nerves-hardware/

Basic HTTP authentication in Elixir/Phoenix

Let’s look on what <a href=”http://nts.strzibny.name/basic-http-authentication-in-elixir-phoenix/“>HTTP Basic auth is and how to implement it in Phoenix</a>. I mention the required HTTP headers, BasicAuth plug, testing, and more.

How we scrapped and aggregated data from multiple sources using OTP

Just like in the documentary series “Big, Bigger, Biggest” we are going to show the different versions we developed on a real project, alongside the pitfalls and breakthroughs of each version, to increasingly scrape and aggregate bigger amounts of data from multiple sources and feed that data into a comprehensive dashboard.

Check on the full post in our blog.

Event sourcing in practice screencast

In this Event sourcing in practice screencast I demonstrate how you can apply event sourcing to an Elixir application.

The slides are available to view online or download (PDF).

benchee 1.0 is finally here!

It has taken some time, but benchee 1.0 is finally here! This release mostly removes deprecated APIs - which ones? Run the 0.99 release to find out! Other than this benchee now shows the absolute difference of the averages in the comparison - is half a millisecond really worth that much new code? Read more in the Changelog and in the release blog post.

ExopData 0.1.5

ExopData new 0.1.5 version has been published:

  • check_operation macro to make your tests cleaner and reduce boilerplate code
  • new Exop’s :uuid type support
  • ~g sigil introduced to help you during custom generators definition

Frank Hunleth - Elixir in Production

We talk with Frank Hunleth from the Nerves core team about their current and past Elixir projects and how they are deployed.

https://podcast.smartlogic.io/season-1-hunleth

Open-source Elixir boilerplate app

https://github.com/mirego/elixir-boilerplate

After building dozens of products with Elixir since 2014, we open-source the boilerplate app we use to kickstart all of our projects!

This boilerplate comes with batteries included, you’ll find:

Usage

  1. Clone this project (git clone https://github.com/mirego/elixir-boilerplate.git)
  2. Delete the internal Git directory (rm -rf .git)
  3. Run the boilerplate setup script (./boilerplate-setup.sh YourProjectName)
  4. Create a new Git repository (git init)
  5. Create the initial Git commit (git commit -a -m “Initial commit”)

Elixir: Gracefully Shutting Down GenServer Process [Video]

In this free episode we’ll take a look at using the terminate callback in GenServer to gracefully shutdown.

From 0 to DynamicSupervisor — Handling Processes in Elixir

With Java it’s possible to use processes and parallelize them but it isn’t common and it’s always a struggle. In Elixir I found another world that, citing Bruce Williams, doesn’t treat concurrency and process management like afterthoughts or advanced features. And a few months ago Elixir was updated to version 1.6 which introduced the DynamicSupervisor.

Check out the full article in our blog

Exop 1.2.4

New Exop 1.2.4 version:

  • new type: :uuid check
  • formatter rules
  • Exop.Chain‘s :name_in_error feature
  • useful aliases

Phoenix LiveView Ant Farm

Last night I wanted to try out Phoenix LiveView, and I created this small experiment consisting of a bunch of old school ants running around (tutorial coming soon).

https://media.giphy.com/media/fjxya6nYXzLk2Ijusp/giphy.gif

See them in action: https://phoenix-liveview-ant-farm.herokuapp.com/

Elixir Streams to process large HTTP responses on the fly

Elixir Streams to process large HTTP responses on the fly

Wouldn’t be great to process a large HTTP response, in chunks, with Elixir streams? Something like:

HTTPStream.get("https://.../large_image.tiff")
|> StreamGzip.gzip
|> Stream.into(File.stream!("image.tiff.gz"))
|> Stream.run

In this first of a two-parts article, we see how to transform an HTTPoison async response into an Elixir Stream, to easily process large remote files on the fly, gaining code clarity and reusability.

TIL Ecto Constraints vs. Validations

When learning about Ecto, it is important to understand when to apply constraints and validations. But what are there differences? When do we need one or the other? Are there times when we want both? All of these questions can be answered on my blog post found on ElixirSchool!

https://elixirschool.com/blog/til-ecto-validations-and-constraints/

ElixirMix Podcast 044 - Dangers of GenServers with Mika Kalathil

In this episode of ElixirMix, the panel talks with Mika Kalathil about common pitfalls using GenServers, recognizing and avoid the mistakes. We talk about the value of using Elixir for startups: developer productivity and the ability to scale when needed and much more!

Podcast Episode

Building a small distributed Elixir Application

Keeping state consistency while running an Elixir application on many servers.

https://medium.com/@iacobson/split-brain-ex-5d5f1c19b133

Released deep_merge 1.0.0

Your library to handle deep/recursive merging finally goes officially stable 🎉🎉🎉

Not too many changes, a default implementation to derive from, type specs and elixir ~> 1.6 support.

Changelog

hex package

Write Better Elixir Code | Medium Article

Article Image

Article Gist

#Don’t Do

new_status = 
    if status == "True" do
       true
    else
       false
    end

#Do

new_status = status == "True"

Local Clustering with epmd

For my project Grapevine, I start a single machine cluster using epmd. I ran into a few issues with the automatic epmd management. This post shows what issues I ran into and how I got around them.

https://blog.oestrich.org/2019/03/starting-epmd-separately

Visual Programming with Elixir: Learning to Write Binary Parsers

Distributed programming isn’t the only area Elixir excels. One of the less advertised strengths of erlang’s little brother is that it contains one of the most elegant and compact ways to define binary parsers in a programming language. Code visually represents data structures making it easy to match and extract bytes and even individual bits in the function heads themselves. This capability makes Elixir an unexpected front-runner for learning and prototyping binary protocols.

https://medium.com/@hansonkd/visual-programming-with-elixir-1bd7f865bf17?source=friends_link&sk=6f7b440eb04ee81679c3ddfede9bab07

Previous page Next page