During the development of the new version of Acutario in Elixir, we had some issues related to notification dispatching.

One of the improvements we are working on is the possibility of sending notifications to multiple services, like e-mail, Slack, push notifications to mobile apps…

That functionality make us face with the problem of using different strategies depending on a concrete scenario that can be different for each user we want to notify, so we decided to develop a library that help us to manage all that cases. And we called it Ravenx.

How Ravenx works

The library is made of strategies, which define…

Having automated tests in a repository can be considered a must-do in any kind of project. In Elixir/Phoenix we can create complex and maintainable tests in a short time but, how can we integrate it with CircleCI?

Getting in touch with CircleCI

CircleCI is just another continuous integration platform, free for both public and private repositories. The main advantage is that, as it’s based on top of containers, you can can access via SSH to the container where your tests are running and debug environment/build issues easily.

So, what’s the matter with Elixir in CircleCI?

CircleCI doesn’t have native support for Elixir/Phoenix projects, so the only option left is trying to automatise the…

Una de las arquitecturas más populares actualmente es la de centralizar los datos en APIs, separándolos de su representación y haciéndolos disponibles para todo tipo de clientes.

Si bien en ocasiones los contenidos de dichas APIs no necesitan ser consultados en tiempo real, también nos encontraremos casos en los que la respuesta tiene que ser lo más rápida posible y actualizada a los últimos datos disponibles. Para este último caso se puede llegar a una solución intermedia empleando las posibilidades de caché que nos aporta Ruby on Rails junto con Grape, Grape-Entity y Redis.

Grape y Entities para nuestras APIs

Si bien no es estrictamente necesario…

I’m a big fan of CloudFlare, but I always have to use a third party service to map my domains to a dynamic IP.

But thanks to the JSON API that CloudFlare uses, now we can update the IP address used in a domain by just issuing a request.

First, get the data needed

To use this cool feature, you will need a few things:

  1. A computer (like a home server), in order to periodically check the external IP.
  2. A free CloudFlare account (configured in your domain) and it’s API key (which you can find here)

Also, you’d need to know the ID of the…

A few days ago I was trying to find my perfect playlist for work, and I realised that there wasn’t only one. Some times you just want a continuous stream of songs, related to a genre or a search. That’s how PipedBeats idea came to my mind.

PipedBeats is a radio streaming web application that let you to define a genre or some keywords to create a random stream of tracks (generously provided by SoundCloud API) to help you concentrate (or not, it’s up to you!) during your work (or relax) hours.

It’s built on pure AngularJS, so the application…

This week I have been playing a bit with custom routes using ui-router, one of the most popular routers available in the AngularJS ecosystem.

An approach to the problem

My first idea was to search some data using two optional variables (we will call them var1 and var2). This can be easy, but analysing the use cases we found that:

  • User can give us both values.
  • User can give us var1 value only.
  • User can give us var2 value only.

Now, we have three different scenarios that can be resolved in a few different ways:

  • Passing variables as query parameters: /search?var1=value1&var2=value2.
  • Creating routes that accept…

Sometimes you may want to do one specific task that requires to build/install some software and/or libraries just to run it once.

Normally it’s very painful to do it in your computer/server because it could left some files that you aren’t going to use, or just because you want to keep your system clean.

I’ve found myself with this problem this weekend, and the solution was very easy: use a specific Docker instance for that.

Creating a docker instance

We want to create a Docker container for the application we need and it’s libraries.

In a normal situation we would create a Dockerfile with…

During the last weeks I have been working in building my first real Node.js application (in fact, I’m currently using a MEAN stack). So the first step was to look for a good application structure.

TD;LR: if you want to go directly to the code, you can go to this GitHub repository

But.. Why? The short answer is to be able to create a maintainable project, in which anyone can find a specific piece of the app without having to kill me first.

To achieve that, the first step was to look at well known structure for me: the project…

Last weekend I made a fresh installation of OSX in my personal computer. As the latest version of OSX, El Capitán (10.11), has been released the past week, it was the version I installed.

Also, I decided to look after Rbenv and compare it with RVM (Ruby Version Manager). After looking in some pages like this, it’s clear that the best option (maybe the best structured) is Rbenv, while RVM provides a more comfortable way of managing Ruby versions and gemsets.

In a few words, Rbenv provides:

  • Easy Ruby version management without rewrites of shell functions, so other programs can…

Today I’ve been installing OpenVPN server on my home server to being able to securely connect to my local network from anywhere. This can allow you to:

  • Having access to local services on your local network , like a (in my case) a Time Machine docker service.
  • Access services only available from your country IP when travelling to other places.
  • Being able to use open hotspots while encrypting your whole network traffic.

In order to get it, my first thought was to install the server on the bare metal machine (not on a Docker instance) because it may require some…

Óscar de Arriba

Software developer that often writes @ codingcode.io

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store