rand(Ø)

> beautiful code & photos

about <

Build a basic Docker stack on Digital Ocean

As I'm getting more and more familiar with NodeJS and Docker, I'd like to Dockerize the few Webapps that run on this server so I can avoid to maintain different stacks.

I use Digital Ocean virtual hosting and I'm pretty happy with it.

Docker is straigtforward enough when it comes to run some containers for testing or development purposes but when you need to deal with High Availability or auto-scaling, it could become a real pain in the ass to configure a CoreOS cluster with all the layers that comes with it.
You'd need to setup fleet, a reverse proxy

> Continue Reading

JS: Singleton as a module

When you develop a NodeJS application, you probably get to work with services and as much as possible with service dependency injection.
As I worked quite a lot with Symfony lately, I wanted to be able to manage my NodeJS services as it should be, and in some case, like a database connection: a single instance for the whole script.

I quicky looked onto Internet to see how to build a singleton in JavaScript (pardon my weak skills in this language) and I quickly found what I was (almost) looking for.

Code examples provided in the different posts I've read

> Continue Reading

NodeJS: Quick dev server

I'm on a nice project where I need to develop a kind of proxy in NodeJS. When you work to forward data after possible filtering or transformation, it's never too easy to quickly set up an environment in order to test your on-going development.

Using NodeJS, I extended my colleague very small HTTP server that just returns a 201 HTTP code and prints the request body in the console:

// debug-server.js
var http = require('http');  
var port = process.env.PORT || 8080;  
var host = '127.0.0.1';

http.createServer(function (request, response) {  
    // console.log(request.headers);
    request.pipe(process.stdout)
> Continue Reading

RabbitMQ installation on Vagrant/Centos

Today I wanted to update our AMQP producer payload so I needed to have RabbitMQ installed and ready in my Vagrant virtual machine. We use Centos 6.

In our Vagrantfile:

config.vm.network :private_network, ip: "192.168.x.x"

The EPEL rabbitmq-server is in version 3.1.5 while the latest version (and the version where the plugin management command sits) is the 3.5.3.

So, in order to install the RabbitMQ server:

$ sudo yum install erlang
$ wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.5.3/rabbitmq-server-3.5.3-1.noarch.rpm
$ sudo rpm --import https://www.rabbitmq.
> Continue Reading

OSX: Dealing with property list files

During my last CareerBuilder Hackathon, I worked finished a project that will incredibly help our growing tech teams. If you ever worked in a consulting company, you know how painful it is to wait to gather server credentials and set up them on your machine to be fully operational.

My project is very simple but damn useful: it generates several type of configuration directly from our platform API. You need to have SSH access to servers or connect to database servers? No problems, you provide your SSH user/key path and I take care of generating the file for you

> Continue Reading

Pour vous j'ai essayé la greffe du tympan, 2 fois !

Il y a 3 ans, lors d'un super weekend en campagne dans l'État de New-York (au temps où j'habitais là-bas), je me suis claqué le tympan droit en plongeant d'une hauteur de 30 cm. Oui oui, 30 centimètres.

Après récidive quelques mois plus tard, j'ai décidé de me faire consulter sérieusement à mon retour en France. Entre temps, le tympan était resté ouvert et donc une opération s'imposait pour reboucher ce minuscule orifice.

Une perforation tympanique n'ôte pas l'ouïe

Le nombre de personnes m'ayant demandé comment j'avais pu passer autant de temps avec un tympan ouvert en sous-entendant que je

> Continue Reading