Discussion
Loading...

#Tag

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Keila
@keila@fosstodon.org  ·  activity timestamp last week

Here is a neat little trick when you need to test a verification flow in #PhoenixFramework: https://gist.github.com/wmnnd/cb80d4eae79d5d35b8229d6eec188ee5

It's a common pattern to pass a URL generator to a context function. But you can pass a function that captures the token with an Agent instead.

#elixirlang #myelixirstatus

test "verify something from a token", %{conn: conn} do
  {:ok, agent_pid} = Agent.start_link(fn -> nil end)
  capture_token = fn token ->
    Agent.update(agent_pid, fn _ -> token end)
  end

  MyApp.SomeContext.send_verification_email(&capture_token.(&1))
  token = Agent.get(token_agent, & &1)

  assert something(token)
end
test "verify something from a token", %{conn: conn} do {:ok, agent_pid} = Agent.start_link(fn -> nil end) capture_token = fn token -> Agent.update(agent_pid, fn _ -> token end) end MyApp.SomeContext.send_verification_email(&capture_token.(&1)) token = Agent.get(token_agent, & &1) assert something(token) end
test "verify something from a token", %{conn: conn} do {:ok, agent_pid} = Agent.start_link(fn -> nil end) capture_token = fn token -> Agent.update(agent_pid, fn _ -> token end) end MyApp.SomeContext.send_verification_email(&capture_token.(&1)) token = Agent.get(token_agent, & &1) assert something(token) end
  • Copy link
  • Flag this post
  • Block
Paweł Świątkowski
Hubert Chathi
Paweł Świątkowski and 1 other liked this activity
Nicd
@nicd@masto.ahlcode.fi  ·  activity timestamp 2 weeks ago

After 12 years of hobbyist usage, today I wrote my first paid lines of Elixir.

#MyElixirStatus #Elixir

  • Copy link
  • Flag this post
  • Block
Nicd
@nicd@masto.ahlcode.fi  ·  activity timestamp 2 weeks ago

After 12 years of hobbyist usage, today I wrote my first paid lines of Elixir.

#MyElixirStatus #Elixir

  • Copy link
  • Flag this post
  • Block
Keila
@keila@fosstodon.org  ·  activity timestamp 2 weeks ago

In #ElixirLang you can simply write :timer.hours(2) instead of 2 * 60 * 60 * 1000.

#til #myelixirstatus

  • Copy link
  • Flag this post
  • Block
André Hoarau
@ah@floss.social  ·  activity timestamp 3 weeks ago

After a couple of days of sysadmin work, I've got rid of Kamal and #Docker. I can now deploy @brinjel with zero downtime thanks to #Ansible, #Caddy, #systemd and #rsync.

Simplifying your stack and making your infra more robust at the time, that's the way!

#myElixirStatus #elixirlang #buildInPublic #indiehackers

  • Copy link
  • Flag this post
  • Block
Tom
@Tallish_Tom@mastodon.scot  ·  activity timestamp last month

Hi @ThinkingElixir , I know you don't do many interviews at the moment but it would be cool if you could talk to some of the folks from @bonfire ! Its a significant elixir project doing some exciting things and its getting close to its 1.0 release.

#elixir #myelixirstatus

  • Copy link
  • Flag this post
  • Block
T0ha
@t0ha@mastodon.social  ·  activity timestamp last month

Calling all tech innovators! 🚀 I'm a senior Erlang and Elixir dev ready to bring experience and passion to your project. Available for new opportunities.
https://www.linkedin.com/in/anton-shvein/
https://t0ha.ru
#Erlang #Elixir #OpenForJob #ElixirLang #MyElixirStatus

  • Copy link
  • Flag this post
  • Block
Pascal boosted
Angelika Cathor
@angelikatyborska@mas.to  ·  activity timestamp 2 months ago

The Elixir track on Exercism has a new practice exercise, Camicia. Thanks to Francesco Sangalli who not only implemented it in Elixir, but also designed it 🥳

https://exercism.org/tracks/elixir/exercises/camicia

#Elixir#MyElixirStatus #Exercism

  • Copy link
  • Flag this post
  • Block
Angelika Cathor
@angelikatyborska@mas.to  ·  activity timestamp 2 months ago

The Elixir track on Exercism has a new practice exercise, Camicia. Thanks to Francesco Sangalli who not only implemented it in Elixir, but also designed it 🥳

https://exercism.org/tracks/elixir/exercises/camicia

#Elixir#MyElixirStatus #Exercism

  • Copy link
  • Flag this post
  • Block
AdrianC
@adrianc@hachyderm.io  ·  activity timestamp 3 months ago

Totally missed what Cachex got the last few updates, so that was a nice read

https://whitfin.io/blog/cachex-v4-0-optimization-consolidation-and-routing/

#ElixirLang#MyElixirStatus

  • Copy link
  • Flag this post
  • Block
Serial Experiments Dorgan and 1 other boosted
AdrianC
@adrianc@hachyderm.io  ·  activity timestamp 3 months ago

The official Elixir LSP is out!!

https://github.com/elixir-lang/expert

#ElixirLang#MyElixirStatus

  • Copy link
  • Flag this post
  • Block
AdrianC
@adrianc@hachyderm.io  ·  activity timestamp 3 months ago

The official Elixir LSP is out!!

https://github.com/elixir-lang/expert

#ElixirLang#MyElixirStatus

  • Copy link
  • Flag this post
  • Block
Nicd
@nicd@masto.ahlcode.fi  ·  activity timestamp 3 months ago

Finnish people don't read this toot, thank you.

I maintain a few packages in the BEAM ecosystem (in Elixir and Gleam). I also sometimes blog about related things. If you'd like to support that, and you're not from Finland, you can do so now at https://liberapay.com/Nicd (Finnish users are blocked). It also acts as a bit of a showcase of things I've done, although I still need to add some things.

#MyElixirStatus#Elixir#Gleam#BEAM

  • Copy link
  • Flag this post
  • Block
Raúl Chouza and 3 others boosted
Margaret Eldridge
@pragmaticmarg@hachyderm.io  ·  activity timestamp 3 months ago

Celebrating Advanced Functional Programming with Elixir by Joseph Koski now in beta!

🔗 Read more: https://bit.ly/3V5AQBZ

📘 ebook: https://pragprog.com/titles/jkelixir

#Elixir #functionalprogramming#MyElixirStatus#WeBEAMTogether #programming #pragprog

Book cover for Advanced Functional Programming with Elixir by Joseph Koski, showing a world map with glowing blue paths, arrows, and markers
Book cover for Advanced Functional Programming with Elixir by Joseph Koski, showing a world map with glowing blue paths, arrows, and markers
Book cover for Advanced Functional Programming with Elixir by Joseph Koski, showing a world map with glowing blue paths, arrows, and markers
  • Copy link
  • Flag this post
  • Block
Margaret Eldridge
@pragmaticmarg@hachyderm.io  ·  activity timestamp 3 months ago

Celebrating Advanced Functional Programming with Elixir by Joseph Koski now in beta!

🔗 Read more: https://bit.ly/3V5AQBZ

📘 ebook: https://pragprog.com/titles/jkelixir

#Elixir #functionalprogramming#MyElixirStatus#WeBEAMTogether #programming #pragprog

Book cover for Advanced Functional Programming with Elixir by Joseph Koski, showing a world map with glowing blue paths, arrows, and markers
Book cover for Advanced Functional Programming with Elixir by Joseph Koski, showing a world map with glowing blue paths, arrows, and markers
Book cover for Advanced Functional Programming with Elixir by Joseph Koski, showing a world map with glowing blue paths, arrows, and markers
  • Copy link
  • Flag this post
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.0 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login