Elixir and Unity3D

https://www.dailydrip.com/blog/elixirsips-198-elixir-and-unity3d

How to use Elixir's Enum.filter_map

https://niallburkley.com/blog/elixir-filter-map/

I wrote a short post to (hopefully) make it a little easier to understand how to use Elixir’s Enum.filter_map/3 to filter and map a collection.

Refactoring for Tests in Elixir

http://www.devonestes.com/refactoring-for-tests-in-elixir/

Need to test that tricky function? Here’s a story of a refactoring that allowed us to add some good new tests for a new feature in Benchee.

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.

Writing a Custom Action in #ExAdmin

https://davejlong.com/2017/05/24/writing-a-custom-action-in-exadmin/

How to customize actions of ExAdmin resources.

Talk: Monoliths to Services with Elixir and Phoenix

https://bit.ly/elixir-microservices

Transitioning monolithic apps into a micro-service architecture isn’t straightforward – in fact, it is often quite difficult. In this intermediate talk, we’ll learn how Elixir umbrella apps and Phoenix utilize the Erlang VM (BEAM) to make building services less painful and more productive.

Pattern Matching And State Machines

How to build a template engine (using simple string interpolation), leveraging pattern matching and state machines while measuring overall performance.

https://nerds.stoiximan.gr/2017/05/24/pattern-matching-and-state-machines/

Blog: Using ASDF-vm

In our latest embedded-elixir blog post, Connor Rigby describes how to manage multiple versions of Elixir and Erlang/OTP using ASDF-vm. http://embedded-elixir.com/post/2017-05-23-using-asdf-vm/

Modules & Functions | Zero to Hero #4

Let’s learn how to build a module in Elixir

Modules & Functions | Zero to Hero #4 https://youtu.be/Ipddkt5DR2w

Sending Email with Bamboo - Part 2

Part 2 of our series on sending email with Bamboo. Watch how easy Bamboo makes it to use layouts and templates to compose emails: https://elixircasts.io/sending-email-with-bamboo-part-2

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.

Elixir for Java Developers, Episode I

I’m starting a series of posts to people from Java learn Elixir faster. I hope you guys like it.

https:[email protected]/elixir-for-java-developers-episode-i-66b65c862652

Sobelow, the Phoenix vulnerability scanner - v0.2.5

Changes include:

  • Flag for an additional SQL injection vector
  • Small addition to XSS checks
  • Minor bug fixes and refactoring

You can now install with mix archive.install hex sobelow, and if you want (or need) to install an older version, you can do so with mix archive.install hex sobelow 0.2.4.

https://github.com/nccgroup/sobelow

retort 2.1.0

Install: https://hex.pm/packages/retort/2.1.0
Docs: https://hexdocs.pm/retort/2.1.0
Changes: https://github.com/C-S-D/retort/compare/v2.0.0...v2.1.0

Changelog

Enhancements

  • Extract Retort.Resources.timeout/2 to Retort.Resources.Timeout.get_or_default(module, function). Retort.Resources.Timeout also has functions for deleting and putting module-wide and function name specific timeouts, to make testing easier and less boiler plate needed in override examples.
  • Retort.Resources.Timeout.delete(module) will delete timeouts set by Retort.Resources.Timeout.put(module, timeout) OR Retort.Resources.Timeout.put(module, function_name, timeout).
  • Retort.Resources.Timeout.delete(module, timeout) will delete timeout set by Retort.Resources.Timeout.put(module, function_name, timeout) OR remove the timeout for function_name and leave it for the other function names when Retort.Resources.Timeout.put(module, timeout) is called.
  • Retort.Resources.Timeout.put(module, timeout) will set the timeout for all Retort.Client.Generic calls by module that called use Retort.Resources.
  • Retort.Resources.Timeout.put(module, function_name, timeout) will set the timeout for all Retort.Client.Generic function_name calls by module that called use Retort.Resources.
  • Retort.Resources.Timeout.put(module, function_name, timeout, func) will only temporarily Retort.Resources.Timeout.put/3, but for the duration passed function only. This can be used to test timeout handling.
  • Update to credo 0.7.4.

Bug Fixes

  • Fix formatting of timeout override example code.

Deprecations

  • Retort.Resources.timeout(module, function_name) is deprecated; use Retort.Resources.Timeout.get_or_default(module, function_name) instead.

Elixir - GenStateMachine

https://www.dailydrip.com/blog/elixir-genstatemachine

When to use processes in Elixir - Part 2: Running concurrent tasks

In the second instalment of “When to use processes in Elixir” I wrote about using processes to run concurrent tasks.

https://medium.com/elixirlabs/when-to-use-processes-in-elixir-part-2-running-concurrent-tasks-108cf2c57d96

In case you missed it, you could already send emails with attachments using Swoosh 0.8, all adapters supported

Checkout docs at https://github.com/swoosh/swoosh#attachments

The adapters list:

  • SMTP Swoosh.Adapters.SMTP
  • Sendgrid Swoosh.Adapters.Sendgrid
  • Mandrill Swoosh.Adapters.Mandrill
  • Mailgun Swoosh.Adapters.Mailgun
  • Postmark Swoosh.Adapters.Postmark
  • SparkPost Swoosh.Adapters.SparkPost

Startup Job, a sample project to search startup jobs

Hi there,

I just published my first Phoenix project Startup Job, an umbrella project to search startup jobs which scraped from various websites.

You can find out more on the GitHub repo.

Streaming Data with Ecto

Let’s build a small CSV exporter to show how you can stream data from your database using Ecto!

Blog: Poncho Projects

New blog post on Embedded-Elixir - Why we prefer ponchos over umbrellas on Nerves-based projects. http://embedded-elixir.com/post/2017-05-19-poncho-projects/

Sobelow - 0.2.3

The Phoenix Framework vulnerability scanner - Source

Updates include minor bug fixes, and checks for some types of command injection.

retort 2.0.0

https://hex.pm/packages/retort/2.0.0

Changelog

https://github.com/C-S-D/retort/compare/v1.3.2...v2.0.0

Enhancements

  • Document Retort.Resources
  • Update to alembic 3.3.0
  • Drop the need for changeset_render by using JaSerializer.Formatter.Utils.format_key directly to make it the same as calcinator.
  • Update to calcinator 3.0.0
  • Retort.Response.Error.to_calcinator_error(Retort.Response.t, Ecto.Changeset.t) will convert Retort.Response.t data Alembic.Document.t errors to a Calcinator error. If the Alembic.Error.t format is unrecognized, it is assumed to be convertable to Ecto.Changeset.t errors using Retort.Response.Error.Ecto.Changeset.add_alembic_errors(changeset, errors)

Bug Fixes

  • A missed rename left the application name used for Application.get_env as the original :interpreter_server_rpc instead of :retort in Retort.Resources.timeout/2.
  • Fix (Map -> map) typo in Retort.Client.Generic.start_link options.
  • Retort.Resources.client_start_link should not have been 0-arity, but 1-arity, so it can take in the client_start_link_options as an argument instead of depending on lookup by module to retrieve some hidden state.
  • Retort.Meta.valid!/2 checked if the Ecto.Repo was sandboxed with Application.get_env(:retort, Retort.Repo), which is a faithful translation of the original in :interpreter_server_rpc, but has the problem that it only works in retort itself. To allow the repo to be check to be configured, Retort.Meta.valid!/2 now takes an :ecto_repo_module option, which is check if its sandboxed if any of the :ecto_schema_modules are database-backed (have a non-blank __schema__(:source)).
  • Retort.Server.Generic.Resources.handle_method/2 converts {:error, :sandbox_token_missing} into RPC response errors instead of a CaseClauseError exception.

Incompatible Changes

  • Retort.Resources.client_start_link callback changes arity from 0 to 1 and now should take in options instead of calling Retort.Resources.client_start_link_options/0.
  • Retort.Client.Generic.start_link calls where the ecto_schema_module_by_type ecto_schema_modules are database-backed will now require :ecto_repo_module to check if the Ecto.Repo.t is sandboxed.
  • Require alembic ~> 3.3
  • changeset_render is no longer needed for Retort.Server.Generic.Resources, so Retort.Server.Generic.Resources.t has been removed and a Calcinator.t should be used as the state instead.
  • Require to calcinator ~> 3.0
  • Retort.Response.Error.Ecto.Changeset.add_alembic_errors(changeset, [Alembic.Error.t]) will convert the Alembic.Error.ts to validation errors added to the changeset. It’s a way to reverse the conversion done by Alembic.Document.from_ecto_changeset in alembic 3.3.0.
  • Retort.Response.Error.to_calcinator_error(Retort.Response.t, Ecto.Changeset.t) will convert Retort.Response.t data Alembic.Document.t errors to a Calcinator error. If the Alembic.Error.t format is unrecognized, it is assumed to be convertable to Ecto.Changeset.t errors using Retort.Response.Error.Ecto.Changeset.add_alembic_errors(changeset, errors)
  • Retort.Server.Generic.Resoruces.handle_method/2 is simplified using put_rendered_or_error/2, so that the large, duplicate cases are eliminated and error handling remains consistent across actions. For error, put_calcinator_error is called.
  • use Retort.Resources generates delete(changeset, query_options) to match the updated Calcinator.Resources.delete/2.
  • Retort.Resources.client_start_link_options now takes (module, query_options), so that if :meta exists in query_options and “beam” is set, then the pre-existing “beam” will be reused.
  • All action callbacks in Retort.Resources catch {:exit, {:timeout, _}} from the Retort.Client.Generic calls, log them, and then return {:error, :timeout}, so that Calcinator.Controller can turn it into a 504 Gateway Timeout instead of crashing the calling process.
  • All action callbacks in Retort.Resources can transform {:error, %Retort.Response.Error{}} to Calcinator errors using Retort.Client.Generic.error_to_calcinator_error.
  • meta in query_options is put back into the mergable params passed to Retort.Client.Generic calls in Retort.Resources