Throttling and Blocking Bad Requests in Phoenix Web Applications with PlugAttack

https://www.paraxial.io/blog/throttle-requests

This post describes how an account takeover attack works, from the perspective of the attacker, and the owner of a victim Phoenix application. After the reader sets up the environment, we introduce PlugAttack, an Elixir library to throttle and ban clients who are abusing the login functionality.

ato

[File Format Verification] With Elixir

How to whitelist file extensions with Elixir.

Check it Out

ThinkingElixir 084: LiveBeats with Chris McCord

In episode 84 of Thinking Elixir, We talk with Chris McCord about the LiveBeats project he created. It’s a high-quality, showcase, open source project that highlights new and powerful features in LiveView. LiveBeats is a social music playing application that challenges current ideas about what LiveView is able to do. It uses presence, new JS features, defines reusable Tailwind styled components, includes accessibility and more! An exciting project that people can actually use in addition to being a great community resource. We also get into what’s coming out in Phoenix 1.7 that may interest people getting ready to start a new project!

https://podcast.thinkingelixir.com/84

Formatting GraphQL in Elixir projects

Format GraphQL strings in your Absinthe projects using a custom Elixir formatter plugin. https://maartenvanvliet.nl/2022/01/26/absinthe_formatter/

TIL: Custom timestamps fields in Elixir

Ecto Schema is very easy to adapt to our needs. Besides changing the type of the primary key, you can also change the type and names of the fields created by the timestamps() macro.

Check on: https://bartoszgorka.com/custom-timestamps-fields-in-elixir

New Book Released: Phoenix Deployment Handbook

Jack from StakNine has published the Phoenix Deployment Handbook.

Learn how to deploy to Fly with two commands. Automate deployments when you push to GitHub. Set up email delivery, error monitoring, log management, and web analytics.

Save hours deploying your first app or improving your existing deployment process.

Visit the link below to learn more and download the Quick Reference Guide attachment for free.

Phoenix Deployment Handbook

Auto Generate [Fake Usernames With Elixir]

How to auto generate usernames data with Elixir.

Check it Out

What you should know about the live_session macro

Imagine you have a few endpoints and would like to group their authorization rules. With live_session/3, can achieve that! https://til.simplebet.io/posts/9j3dphzwgq-what-you-should-know-about-the-livesession-macro

We’re on the Brink of Cryptopunk

https://www.badykov.com/elixir/cryptopunk/

I developed a crypto wallet library for Elixir called cryptopunk. And in this post, I’ll describe how you can use it

DynamoMigration has been released. -Version management tool for DynamoDB migrations.-

DynamoMigration is simple version management tool for dynamo_db migration files.

Links

Usage

  1. Create migrations table.

    $ mix dynamo.setup
  2. Generate and rewrite migration file.

    $ mix dynamo.gen.migration create_tests_table
    # priv/dynamo/migrations/20220130083004_create_tests_table.exs
    defmodule Dynamo.Migrations.CreateTestsTable do
      def change do
        # Rewrite any migration code.
        # Examples.
        ExAws.Dynamo.create_table(
          "Tests",
          [id: :hash],
          %{id: :number},
          1,
          1,
          :provisioned
        )
        |> ExAws.request!()
      end
    end
  3. Migrate.

    # Executes `priv/dynamo/migrations/*` if there had not migrated.
    $ mix dynamo.migrate

Help To Test Your Library

Simple yet quite effective approach to make your library a charm to test. DummyWorker that sends a message back to testing process instead of performing a real action.

▸ https://rocket-science.ru/hacking/2022/01/30/help-to-test-your-library

Video explainer - What Is: Elixir

Put together this video to try and explain Elixir to developers that aren’t familiar. Please share it to those who have expressed interest and you think could benefit. By underjord.io

https://youtu.be/2uvScmCrouk

REnum 0.7.0 has been released! ~REnum is Enum extended with convenient functions inspired by Ruby and Rails ActiveSupport~

In this release, we have expanded the convenience functions related to Range.

This almost completes the expansion of major Enumerables such as Enum, List, Range, Map.

Thanks😆

https://hex.pm/packages/r_enum

[Elixir Wizards S7E11] Arthi Radhakrishnan on the Value of Collaborative Learning for Software Engineers

“Hands down my favorite way to learn is through pair programming.” - Arthi Radhakrishnan joins us this week for a passionate conversation on the types of learning in the software industry that inspire her the most. https://smartlogic.io/podcast/elixir-wizards/s7e11-arthi/

And don’t forget to take our Audience Survey! https://smr.tl/survey

How to leverage from on_mount and reduce your code in LiveView

Phoenix LiveView has implemented some cool features, and one of them is the on_mount/1 callback function… https://til.simplebet.io/posts/emefbhudrx-how-to-take-leverage-from-onmount-to-reduce-code

Elixir Meetup #1 ▶ Hosted by Curiosum

1st Elixir Meetup hosted by Curiosum

https://youtu.be/wz9aF0Kmwkk

Krzysztof Kempiński - RELIABILITY OF ELIXIR & ERLANG Michał Buszkiewicz - DEBUGGING ELIXIR CODE - THE TOOLS, THE MINDSET Szymon Soppa - STRUCTURING ELIXIR & PHOENIX PROJECT - OUR APPROACH

REnum 0.6.0 has been released!

In this release, we have expanded the convenience functions related to Map. Also, I changed the README. I’ve made a lot of examples, so I hope you’ll take a peek and think, “This is convenient!” https://hexdocs.pm/r_enum/readme.html

About RMap

RMap is Map extended with convenient functions inspired by Ruby and Rails ActiveSupport. All the functions are available defined in

dig/2

Returns the object in nested map that is specified by a given key and additional arguments.

iex> RMap.dig(%{a: %{b: %{c: 1}}}, [:a, :b, :c])
1

iex> RMap.dig(%{a: %{b: %{c: 1}}}, [:a, :c, :b])
nil

each_key/2

Calls the function with each key; returns :ok.

iex> RMap.each_key(%{a: 1, b: 2, c: 3}, &IO.inspect(&1))
# :a
# :b
# :c
:ok
# See also RMap.Ruby.each_value, RMap.Ruby.each_pair

except/2

Returns a map excluding entries for the given keys.

iex> RMap.except(%{a: 1, b: 2, c: 3}, [:a, :b])
%{c: 3}

invert/1

Returns a map object with the each key-value pair inverted.

iex> RMap.invert(%{"a" => 0, "b" => 100, "c" => 200, "d" => 300, "e" => 300})
%{0 => "a", 100 => "b", 200 => "c", 300 => "e"}

iex> RMap.invert(%{a: 1, b: 1, c: %{d: 2}})
%{1 => :b, %{d: 2} => :c}

values_at/2

Returns a list containing values for the given keys.

iex> RMap.values_at(%{a: 1, b: 2, c: 3}, [:a, :b, :d])
[1, 2, nil]

deep_atomlize_keys/1

Returns a list with all keys converted to atom. This includes the keys from the root map and from all nested maps and arrays.

iex> RMap.deep_atomlize_keys(%{"name" => "Rob", "years" => "28", "nested" => %{ "a" => 1 }})
%{name: "Rob", nested: %{a: 1}, years: "28"}

iex> RMap.deep_atomlize_keys(%{"a" => %{"b" => %{"c" => 1}, "d" => [%{"a" => 1, "b" => %{"c" => 2}}]}})
%{a: %{b: %{c: 1}, d: [%{a: 1, b: %{c: 2}}]}}
# See also RList.ActiveSupport.deep_symbolize_keys, RList.ActiveSupport.symbolize_keys, RList.ActiveSupport.deep_stringify_keys, RList.ActiveSupport.stringify_keys,

deep_transform_keys/2

Returns a list with all keys converted to atom. This includes the keys from the root map and from all nested maps and arrays.

iex> RMap.deep_transform_keys(%{a: %{b: %{c: 1}}}, &to_string(&1))
%{"a" => %{"b" => %{"c" => 1}}}

iex> RMap.deep_transform_keys(%{a: %{b: %{c: 1}, d: [%{a: 1, b: %{c: 2}}]}}, &inspect(&1))
%{":a" => %{":b" => %{":c" => 1}, ":d" => [%{":a" => 1, ":b" => %{":c" => 2}}]}}
# See also RList.ActiveSupport.deep_transform_values

Come join our team at Enzai!

AI is sh*t scary. Let’s do something about it! We’re Enzai, and we’re on a mission to make sure artificial intelligence is safe and sustainable for the future.

Full description: https://github.com/enzai-technologies/public/wiki/Full-Stack-Developer-2022

Do you like Pokemon?

PokeMake is Command line tool to decorate your make commands with Pokemon made by Elixir. demo

Installation

$ brew install tashirosota/homebrew-tap/poke_make

Usage

$ poke -h
usage: poke [version | -v | --version]
           [help | -h | --help]
           <make command>

poke <make command> is to start make <make command>
$ cat Makefile
hello:
    echo hello
$ poke hello
# call make hello with pokemon ascii art.

Links

REnum 0.5.0 has been released.

REnum is Enum extended with convenient functions inspired by Ruby and Rails ActiveSupport. It also provides full support for native functions through metaprogramming.

Links:

Usage

carbon

Previous page Next page