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.

Screencast

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

https://realworldphoenix.com/blog/2020-02-11/simple_phoenix_presence

Turns ABNF into parser https://github.com/princemaple/abnf_parsec

Made this little thing, if anyone finds it useful

ABNF in, parser out https://github.com/princemaple/abnf_parsec

  • 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.

https://keathley.io/blog/reusable-libraries.html

Hades - A wrapper for NMAP written in Elixir

https://github.com/fklement/hades/tree/0.0.1-alpha

Example

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("192.168.120.42")
...> |> Hades.scan()
12:19:25.739 [info]  NMAP Output: "Starting Nmap 7.80 ( https://nmap.org ) at 2020-02-07 12:19 CET\n"

12:19:25.788 [info]  NMAP Output: "Nmap scan report for Felix-MACNCHEESEPRO.root.box (192.168.120.42)\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: "Felix-MACNCHEESEPRO.root.box", ip: "192.168.120.42", 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

https://github.com/rupurt/schoolbus

Start the bus

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

Register a topic

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

Register a namespaced topic

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

Subscribe to a registered topic

iex(3)> Schoolbus.subscribers()
[]
iex(4)> Schoolbus.subscribe(:games)
{:ok, [:games]}
iex(5)> self()
#PID<0.208.0>
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()
#PID<0.208.0>
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
:ok
iex(12)> Schoolbus.broadcast(:games, :uno)
:ok
iex(13)> flush
:uno
:ok

10 Killer Elixir Tips —#10

https://elixir-tips.blackode.in/2020/02/06/killer-elixir-tips-10.html

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: https://podcast.smartlogic.io/s3e11-lumen

DateTimeParser 1.0.0 released

https://hexdocs.pm/date_time_parser

https://github.com/taxjar/date_time_parser

Changelog:

  • 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

Monitoring the Erlang VM With AppSignal's Magic Dashboard

Walk through monitoring the Erlang VM with the metrics automatically shown in AppSignal’s Magic Dashboard - https://blog.appsignal.com/2020/02/04/elixir-monitoring-erlangvm-with-magic-dashboards.html

gen_rmq 2.4.0 version release (with Telemetry support)

GenRMQ is a set of behaviours meant to be used to create RabbitMQ consumers and publishers.

Changelog:

IntelliJ Elixir v11.5.0

Enhancements

  • Ignore the incompleteCode flag and instead always use the criteria used when incompleteCode was set.

    name prefix exact name ResolveResult valid
    N/A N/A

    This extends #1617 to more cases.

    • Qualified calls (Process.flag(…), etc)
    • Type specs (@spec foo(…))
    • Aliases (alias Foo…)
    • Module Attributes (@attribute)
    • Variables (foo)
    • Protocol reserved module attributes (@protocol and @for)

Bug Fixes

Installation Instructions

Trans has been updated to 2.2.0

Trans, the small library for embedded translations in Elixir schemas has been updated to 2.2.0.

The main change in this new version is that Trans.Translator.translate/3 can now receive a string, allowing us to use the output of Gettext.get_locale/0. For example, we can now write:

Trans.Translator.translate(Article, :title, Gettext.get_locale())

This release also removes Faker as a dependency, updates ExDoc and removes support for Elixir versions older than 1.6 (which are not officially supported by the core team anymore).

You can see the release notes on GitHub or fetch the new version from hex.pm.

Expecting the Unexpected in Elixir

A recent project created for the Stockholm Elixir meetup group. I used Elixir and Scenic to create a fault-tolerant spaceship dashboard for Kerbal Space Program (with a brief NASA history lesson)

Read on Medium

Simple Phoenix LiveView App: Planning DB Schemas

This is a continuation of the Simple Phoenix LiveView App series that started with basic setup and a minimal interactive app that captured keyboard events last time.

This time we’ll plan out schemas, look at the relatively complex associations used in a large content site like Alchemist Camp, as explained in the earlier series, and then decide on a good schema structure for this newer, simpler app.

Screencast + article + diagrams: https://alchemist.camp/episodes/phoenix-live-view-db-schemas

Elixir Wizards S3E10 - Sophie DeBenedetto and Meryl Dakin on Training and Building Elixir Projects Under Constraints

Latest episode released today! Check it out here: https://podcast.smartlogic.io/s3e10-debenedetto-dakin

How to Get Your Elixir Application Ready for CI/CD

Explore a wide array of Elixir ecosystem tools that can help you create top-notch CI pipelines.

https://blog.appsignal.com/2020/01/29/how-to-get-your-elixir-application-ready-for-ci-cd.html

Deploying Phoenix to Ubuntu using Edeliver and Distillery

A series designed for those getting started with Elixir and deployment.

https://phxroad.com/devops/deploy-elixir-phoenix-ubuntu-vps

Real World Phoenix |> Rendering Markdown

In this post Tjaco explores how to render markdown files directly in a Phoenix app and investigates the underling mechanism of Template Engines.

https://realworldphoenix.com/blog/2020-01-28/rendering_markdown

Previous page Next page