A More Complete Library for Stripe
I’ve been looking for a Stripe Library over the past week and each one I looked at fell short in some regard. Most were “very alpha”, some had no tests, others isn’t even build. I first went the route of trying to fork/help but soon found myself reworking the API (instead of just mirroring a REST client) and so I decided to just go my own direction.
The repo is here and the package itself is here.
This is my first Elixir package so there might be some rough spots… in fact I’m sure of it!
The API is essentially what you would expect:
Stripe.Customers.create_subscription("customer_id","test-plan", [options])
ExCasts: Elixir screencasts for all skill levels
This week, Jason Harrelson and I started a new Elixir-based screencast service. We produce bite-sized, introductory screencasts as well as longer, more involved series aimed toward intermediate and advanced Elixir developers. All screencasts are currently free (as of 10/2/15).
Now Power Assert is available on Elixir
Power Assert provides descriptive assertion messages like the following.
1) test Enum.at should return the element at the given index (PowerAssertTest)
array |> Enum.at(index) == two
| | | |
| | | 2
| | 2
| 3
[1, 2, 3]
It’s easy to use your project. You only replace ExUnit.Case into PowerAssert.
This commit shows how to use PowerAssert.
Enjoy!
Using ranch, the high performance acceptor pool from Elixir
This is an early morning experiment with Erlang and Elixir integration:
Video on Virtual Attributes w/ Phoenix and Ecto
Tried my hand at making a screencast. Will work on better format next time!
https://www.youtube.com/watch?t=392&v=_7NNJLhAQ1k
Writing a Blog in Phoenix and Elixir Tutorial
I just published the first part of my tutorial series “Writing a Blog in Phoenix and Elixir”! https://medium.com/@diamondgfx/introduction-fe138ac6079d
Beaker 1.1 Release with Phoenix and Ecto integration
Just added Phoenix and Ecto performance integration into Beaker v1.1!
ExEnv: Elixir Version Management
A very interesting project based on ruby’s rbenv to easily switch between multiple versions of Elixir.
Starting a new Elixir application
I’m starting a new project in Elixir. This LearningElixir post describes the first steps toward designing the application. http://bit.ly/1KDHK3m
New Elixir Screencast: www.LearnElixir.tv
I’ve created a new Elixir screencast aimed at beginners who want to learn the language step by step. For a limited time, you can get access to already recorded episodes and future episodes for $9.
Which Elixir books should I read?
A mini review of the Elixir books I’ve read and which ones I’d recommend you go for if you’re just starting: http://chrismcg.com/2015/09/24/which-elixir-books-should-i-read/
Phoenix Screencasts - Deploying Phoenix to Heroku
I just published a free screencast on how to Deploy Phoenix to Heroku! Great as a reference for those who prefer a screencast rather than the written guide. Also great for those who are curious to see how quick and easy it is.
Core Elixir: List.foldl/3 and List.foldr/3
The fourteenth edition of Core Elixir looks at the two folding functions, which one to default to, how they work, and what further reading you might want to attempt.
Beaker 1.0 Released
Just released Beaker 1.0! It’s an Elixir metrics framework built on top of GenServer! http://github.com/hahuang65/beaker
Cloak Your Ecto Data
A new Hex package that makes it easy to encrypt data with Ecto:
https://github.com/danielberkompas/cloak
It implements the approach I talked about in the following two blog posts:
FFI
A Foreign Function Interface (FFI) for Elixir:
https://github.com/joshnuss/elixir-ffi
Makes it easy to call C functions from Elixir without needing Ports or custom NIFs
defmodule MyLib do
use FFI.Library
ffi_lib "libstdc++.so.6"
attach_function :puts, [:string], :int
end
MyLib.puts(["Hello World from C stdlib"])
Removing controller boiler plate in Phoenix
A nice little helper snippet for people who find themself wasting time writing boilerplate for catching “none of my functions matches” in controller actions.
Using this snippet you can safely write:
def some_action(conn, %{"myparam" => myparam}) when is_binary(myparam) do
without having to make a catchall function matching (conn, _) to match the non-valid uses of your action.
Develop fast web apps in Phoenix using pjax
The idea behind pjax is that you update only the parts of the page that change when the user navigates through your app. However, unlike a normal AJAX app that returns only JSON from the server, a pjax request actually contains normal HTML that has been generated on the server. This HTML is only a fragment of the full page and Javascript is used in the browser to add the content to the page.
In this article I’m going to show you how you can add pjax to the Phoenix framework.
http://rny.io/elixir/phoenix/2015/09/20/pjax-in-phoenix.html
