Mix Task Creation in Elixir Project

Article on how to create mix tasks in elixir projects.

Highlights:

  1. Live demo
  2. Explanation with screenshots

https:[email protected]/mix-task-creation-in-elixir-project-d89e49267fe3#.49cfru6ql

article image

Decorating Elixir

Acutar.io blog post about how they dealed with previously calculated model fields by creating Decoratex, a library that allows to easily decorate virtual fields in Ecto models. https://medium.com/acutario/decorating-elixir-af08bd46b2fc

Domainatrex: properly parse TLDs/Domains in Elixir

Domainatrex is a TLD parsing library for Elixir, using the Public Suffix list :)

https://github.com/Zensavona/domainatrex

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

10 Killer Elixir Tips #2

Thanks for the great response for #1.

Here is another 10 Killer Elixir Tips #2
Happy Coding !!

https://medium.com/blackode/10-killer-elixir-tips-2-c5f87f8a70c8#.50k3xf52z

article image

Flowex 0.2.0 with 'cast' and 'error_pipe'

My talk Flowex - Flow-Based Programming with Elixir GenStage on Elixir Club 5 meetup and following discussions lead me to some significant improvements of the project.

A cast function was added to run calculation asynchronously. And an error handling mechanism was added. Since “0.2.0” each pipeline has error_pipe - separate GenStage for handling errors.

More details here: https://github.com/antonmi/flowex

Railway Oriented Programming in Elixir with Pattern Matching on Function Level and Pipelining

Coding seems cool without error checks, does not it? When if/else checks effect the next execution behaviors, then the code becomes a mess. Luckily, there is a pattern called ‘Railway Oriented Programming’ for error handling.

https:[email protected][email protected]function-level-and-pipelining-e53972cede98

A different approach to elixir test doubles

A proof of concept of a different approach to testing modules in isolation.

http://teamon.eu/2017/different-approach-to-elixir-mocks-doubles/

Create an Elixir web app using Cowboy

This post describes in detail the process of setting up Cowboy server to display a Hello World message.

https://shankardevy.github.io/code/create-elixir-web-app-using-cowboy/

Calculate Execution Time of Your Functions

Like with Ruby lang, the Elixir allows you to code magic without pain. Sometimes, you might need to run a snippet of code before and after execution of a block of code on several function calls. For instance, you need to measure the time elapsed in a function call or multiple function calls.

https:[email protected]/implement-a-basic-block-yield-with-elixir-d00f313831f7

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

Enjoyable XML parsing with Elixir and SweetXml - Elixir Hex package showcase

https://youtu.be/T-3SPxK1RBo

SweetXml is an awesome hex package which makes parsing xml enjoyable :) Don’t beleive that anything to do with XML can be enjoyable? Checkout https://github.com/awetzel/sweet_xml

Source code of demo can be found at: https://github.com/rawcodehq/sweet_xml_hex_package_showcase

Fast Import and Export with Elixir and Postgrex - Elixir Hex package showcase

https://www.youtube.com/watch?v=YQyKRXCtq4s

Watch us cut the import time from 4 minutes to 1 minute to 1 second and then back to 1.7 seconds :)Watch us cut the import time from 4 minutes to 1 minute to 1 second and then back to 1.7 seconds :)

Building & Publishing Elixir Package from scratch.

This video is about the step by step guide to build packages with clear explanation of package files and registration procees to hex.pm

https://youtu.be/Fh1fKF2tHk0

Highlights of Video:

  1. Each File Explanation
  2. Auto Documentation
  3. User Registration - https://hex.pm
  4. Build and Publishing.

Code School's Free 'Try Elixir' Course

Begin learning the basics of Elixir and take your first steps into the world of functional programming.

https://www.codeschool.com/courses/try-elixir

Deep Learning with Elixir Step by Step

We create a Multi-Layered Neural Network with Elixir called Deepnet and then we show how it can be trained to reach a goal. http://tinyurl.com/jkgy3za

Write your own Sigils - Elixir

Sigils looks simple but they are powerful when you used them perfectly. Lets create our own Sigils…..

https:[email protected]/write-your-own-sigils-elixir-ce648f531211#.r59adavd8

sigil image

sigil image

End-to-end Testing in Elixir with Hound

Hound is an Elixir library for browser automation. This tutorial will show you how to use it for web scraping and end-to-end testing Phoenix applications.

https://semaphoreci.com/community/tutorials/end-to-end-testing-in-elixir-with-hound

The story of Conn in the world of Phoenix

A detailed study of Phoenix request-response cycle:

http://shankardevy.github.io/code/elixir-phoenix-conn-request-life-cycle/

Throttle / Debounce your tasks / operations, group them together!

https://github.com/princemaple/together

  • group notifications to be sent in one email

    • cancel the previously queued email if another event happens within a short period (type: debounce / throttle)
  • make heavy operations happen less often, i.e. refresh some global statistics

    • allow only 1 operation per certain period (type: throttle)
  • protect some write api

    • additonally you can choose to use the first value in a period (keep: first)
    • or the last value in the period (keep: last)

Designed to work both on a single node and across nodes in a cluster

Checkout the repo README and the docs for more information

harnais - A harness for testing Elixir code

I’ve just published to Hex the first version of harnais.

harnais is a package to help write concise and convenient tests, without lots of the boilerplate.

Parsing Markdown with Earmark - ElixirCasts.io

Check out our latest episode where we parse some Markdown with Earmark: https://elixircasts.io/parsing-markdown-in-elixir-with-earmark