How to use Markdown as templates in Phoenix

In addition to finishing PhoenixMarkdown v1.0, I’ve also published a blog post on Medium describing how to use it.

https://medium.com/@boydm/markdown-templates-in-phoenix-25721a3bc682

enjoy!

PhoenixMarkdown v1.0 released to Hex

Continuing my roll of updating packages this week…

PhoenixMarkdown version 1.0 has just been pushed to Hex!

https://hex.pm/packages/phoenix_markdown

PhoenixMarkdown lets you use Markdown as first-class templates in Phoenix.

In addition to streamlining the code, you can now optionally process server-side tags in the Markdown file.

The Big Elixir Conference in New Orleans, November 2018

We are working on a site, but in the mean time would like anyone who is interested in attending, speaking or sponsoring to fill out our Google Form https://docs.google.com/forms/d/e/1FAIpQLSfRgC-654H30l4hJvnqug75AW0l3YFeCc-upTMhADHZmQbzXQ/viewform

Solution to Challenge 14: Flattening lists recursively in Elixir

https://youtu.be/ysgz0FdL99E

https://Alchemist.Camp covers two functions for flattening lists in Elixir. One is elegant and concise. The other is tail recursive and performant.

how to process an ets table in chunks or batches

how to process an ets table in chunks or batches https://goodcode.in/elixir/10/how-to-process-an-ets-table-in-chunks-or-batches

Things I wish ActiveRecord had after using Ecto

In this article, I wrote about few things I like about Ecto that aren’t available in Active Record. It’s not meant to be a “Phoenix is better than Rails” rant as both frameworks provide really great things and we can all learn from each of them. https://infinum.co/the-capsized-eight/things-i-wish-active-record-had-after-using-ecto

Functional mocking with Mox

How to use Mox in your test suite, and at which layers you should use them in: https://blog.carbonfive.com/2018/01/16/functional-mocks-with-mox-in-elixir/.

PhoenixIntegration 0.5 published to hex

Apparently I’m updating packages today…

Just published PhoenixIntegration 0.5 to hex. Features the following changes:

  • Adds click_button, which requests links in buttons in a test.
  • Adds follow_button, which follows requests through a button with redirection.
  • Improves error messages when requesting the wrong method.

Engaging the Community

Every year, we have an opportunity to engage the communities that we’re a part of. From Slack to meetups to conferences — everyone can contribute regardless of their experience. How will you contribute to the Elixir community in 2018? https://blog.echobind.com/how-to-engage-a-community-bc7333b6aaf5

Writing simple web services with Ace

Tutorial for getting started with Ace; a featherweight toolkit for developing web applications.

http://crowdhailer.me/2018-01-17/simple-web-services-with-ace/

PolicyWonk v1.0.0-rc.0 released

I just pushed PolicyWonk 1.0.0-rc.0 to hex.

This is a major update (re-write…) that has less code than the original.

v1.0 fixes several issues with the old architecture:

  • It wasn’t compatible with Phoenix 1.3 umbrella apps. Or rather, you couldn’t have separate policies for different apps in an umbrella.
  • It had a whole mess of complexity that simply wasn’t needed. I never used most of the “shortcut” options since the more explicit versions (with slightly more typing) were always clearer.
  • Returning errors from Policies was too vague. I want to know errors are being processed!
  • The config file data isn’t necessary in a more explicit model.
  • Naming was inconsistent between policies and resources.

If you use PolicyWonk, I would appreciate any feedback before declaring it done.

There are breaking changes, so make sure to read the docs on how to upgrade. Overall, the shape is similar, so there is minimal work to make the upgrade. The result works with Phoenix umbrella apps, is simpler, more flexible and has better consistency.

I think the upgrade will be well worth it.

Creating Ecto associations between profiles and stats (StatWatch)

Lesson 14: https://youtu.be/mYsYgNlRuEM

We finish migrating StatWatch from a CSV file-driven app to a database-driven app. We use Ecto to create associations between user profiles and their associated stats and streamline our stat saving by using Repo.insert_all to take in many rows en masse.

Don’t forget to submit your content requests! https://youtu.be/nauHI5omF2M

Peluquero gets v0.99.×

Deal with RabbitMQ like a pro. Sophisticated subscribing, publishing, shoveling and more with a simple config. Implement your business logic, Peluquero will handle the queues :)

https://github.com/am-kantox/peluquero — https://hexdocs.pm/peluquero/gettingstarted.html

K-ordered ids in Elixir

I’ve decided to explore elixir again after using it a little bit, couple years ago. This was an excuse to practice some elixir on something with a small enough scope, yet some practical usage. I’m translating Boundary’s flake id generator to elixir.

Feedback welcome.

https://github.com/anuragsoni/id_gen

Prepare and release your Elixir open source package like a pro

Every time I’m releasing an Elixir open source package, I find myself re-assembling the same list of actions that lead to a properly managed and professional looking release. This guide aims to put all these actions into approachable, ordered list of how to get your open source up and running.

Read more on Shedul Tech Blog.

Tarearbol gets v0.7.0

Lightweight task manager, allowing retries, callbacks, assurance that the task succeeded, and more…

— https://github.com/am-kantox/tarearbol — https://hexdocs.pm/tarearbol/intro.html#features

Update: DETS for scheduled tasks aka cron-like jobs, enhancement of spawn_ensured handling.

Crypto Curry with Elixir

https://medium.com/@iacobson/crypto-curry-with-elixir-1c98a8b5f23 Exploring functional concepts such as currying, composing and pointfree in Elixir

A logger backend for Telegram | LoggerTelegramBackend v1.0

Just published logger_telegram_backend v1.0, a logger backend for Telegram with support for multiple logger handlers and metadata filtering.

Check it out: https://github.com/adriankumpf/logger-telegram-backend

Phoenix & Elm landing page (pt.3)

Here is the last part of my Phoenix and Elm landing page series, where we add Google reCAPATCHA support to the subscription form to avoid spambots.

http://codeloveandboards.com/blog/2018/01/06/phoenix-elm-landing-page-pt-3/

Happy coding!

Lesson 13 Adding Ecto and a Postgres database to StatWatch

Our StatWatch module has been serving Alchemist.Camp well, but let’s add a database and work towards eliminating our reliance on .csv files.

This is our first video to cover Ecto so we went into some detail about getting it set up, creating a user for our db in psql, running various Ecto mix tasks, setting up an Ecto Schema for our table, and then doing basic CRUD from inside iex before jumping into the application’s code.

Finally we dealt with a common mix error that comes up when using ecto in an otp sub-application that’s not an umbrella project.

Today’s challenge: Read over the docs on Ecto Associations (https://hexdocs.pm/ecto/associations.html#content)

Then figure out how we could create an association between the profiles we’re collecting stats for and the stats we’ve collected.

Previous page Next page