Your Elixir bucket for debugging
Your Elixir bucket for debugging https://minhajuddin.com/2018/05/17/your-elixir-bucket-for-debugging/ Put your variables and pids in your bucket :D
WechatPay v0.6.0 has been released!
WechatPay is a toolkit for the Wechat Payment Platform.
v0.6.0 ships with a flexible configuration system which make it possible to use WechatPay in a multi-tenancy application. Also, the HK and US nodes are supported in this version.
Full changelog: https://github.com/linjunpop/wechat_pay/blob/master/CHANGELOG.md#v060
Run specific tests in a phoenix project more conveniently
While refactoring a phoenix application, lazy me figured typing the full path to a test was terribly annoying. So here’s mix_phxtest, a helper package to allow running specific tests with shorter commands.
WebSocket security with Phoenix Channels
We’ve recently gone through a round of pen testing and had to deal with feedback on our use of WebSockets. Here is what we’ve done to get the WebSocket code to pass those pen tests
When to use Elixir language?
I have been asked multiple times recently questions about Elixir and if it’s a good fit for different projects. Let’s try clearing a few things out
ElixirCasts: Ecto Virtual Attributes
In episode #46 we’ll look at how we can use virtual attributes in Ecto to create fields in a schema that we don’t want persisted to the database.
External Service Testing in Phoenix
How to mock external service in test
https://thefirstapril.com/2018/05/14/External-service-testing-in-Phoenix/
Odometex, simple distance comparisons
Just published Odometex v0.1.0, simple distance comparisons for Elixir! 🌍🚶♂️🏃♀️
iex> Odometex.compare(7000)
# => [
%Odometex.Result{label: "Central Park, New York", meters: 4000, times: 1.75},
%Odometex.Result{
label: "Champs-Élysées, Paris",
meters: 1910,
times: 3.664921
},
%Odometex.Result{
label: "Passeig de Gràcia, Barcelona",
meters: 1300,
times: 5.384615
},
%Odometex.Result{label: "Football pitch", meters: 105, times: 66.666667},
%Odometex.Result{label: "Basketball court", meters: 28, times: 250.0}
]
Any feedback or distance request is more than welcome!
Juice - Reduce in memory data structures using a lightweight query language
https://github.com/rupurt/juice
Juice can collect and reject string or atom keys from an Elixir Map or List.
Given the map
iex> fruit_basket = %{
apples: {
granny_smith: 10,
golden_delicious: 3
},
"oranges" => 5,
plums: 6,
"mangos" => 2,
recipients: [:steph, "michael", :lebron, "charles"]
}
Return everything with a wildcard *
iex> Juice.squeeze(fruit_basket, "*") == %{
apples: {
granny_smith: 10,
golden_delicious: 3
},
"oranges" => 5,
plums: 6,
"mangos" => 2,
recipients: [:steph, "michael", :lebron, "charles"]
}
Remove plums and mangos
iex> Juice.squeeze(fruit_basket, "* -plums -mangos") == %{
apples: {
granny_smith: 10,
golden_delicious: 3
},
"oranges" => 5,
recipients: [:steph, "michael", :lebron, "charles"]
}
Only collect granny_smith apples and oranges with nested . notation
iex> Juice.squeeze(fruit_basket, "apples.granny_smith oranges") == %{
apples: {
granny_smith: 10,
},
"oranges" => 5
}
Collect plums and mangos for charles
iex> Juice.squeeze(fruit_basket, "plums mangos recipients.charles") == %{
plums: 6,
"mangos" => 2,
recipients: ["charles"]
}
Setting up Brotli on Nginx or Phoenix
Brotli is a relatively new compression format that has two big advantages over gzip. It’s faster at compressing things and it compresses them down to nearly ~25% smaller files!
Let’s set up our Nginx server to serve brotli compressed HTML, CSS, JS and JSON assets! If you’re running Phoenix, Rails, Django, Node or anything else behind an Nginx proxy, this setup should work for you.
A basic strategy is also covered for serving brotli compressed assets from a Phoenix server running directly on the server without anything proxying in front of it.
Elixir Protocols: a gentle introduction
Protocols are one of the more important but less publicized features of Elixir.
That’s why this lesson focuses on them directly rather than being part of a larger project. It explores defprotocol, fallback_to_any, defdelegate and working with structs.
Reversing BIP-39 and the Power of Property Testing
While building and testing a decoder to go along with the Bitcoin BIP-39 encoder we wrote a few weeks back, a simple property test uncovered a bug in our original implementation that I never would have caught through manual testing.
I’m blown away.
Check out the full article for a rundown on my property testing experience, and the full implementation of the decoder: Reversing BIP-39 and the Power of Property Testing.
Ethereum's Recursive Length Prefix encoding in Elixir
Ethereum’s Recursive Length Prefix encoding in Elixir Implementing RLP with recursive protocols
AlloyCI v0.6.0 released!
AlloyCI v0.6.0 has been released. The biggest change since last release is that it now supports any S3 compatible storage service, in order to store any build artifacts generated by your project. Check it out! https://github.com/AlloyCI/alloy_ci/releases/tag/v0.6.0
Plugs demystified
An entry-level introduction to Plug - build a simple website without using Phoenix.
New version of ElixirJobs with redesign and Telegram channel
New version of ElixirJobs has just been released, including a brand new design, easier offer posting and push of new offers to a dedicated Telegram channel.
Source code updates can be found as usual on GitHub and contributions are welcome!
Learn @elixirphoenix by rebuilding a mini-version of it. 16:00 GMT on 15th May. PM to register.
The first online class on rebuilding Phoenix will be on 15th May, 2018. Considering 16:00 GMT on 15th May (http://everytimezone.com/#2018-5-15,240 ). This session is free or pay what you want. Limited to 16 people. PM to register.
New book: "Phoenix Web Development" is out now!
Hello Twitter! I am proud to announce that my first programming book on #elixir and @elixirphoenix has finally been released to the world! If you like my tutorial series on @Medium this will be right up your alley! https://www.packtpub.com/web-development/phoenix-web-development!
