Developing with Docker over a mobile phone tethering

A few weeks ago I moved my development to Docker. Today I was preparing my development environment to be able to work from an office with limited access to the Internet.

I was trying to provision containers using my Android phone as an Internet link.

The connection failed initially

To fix it, I edited /etc/resolv.conf and added

After it I had to flush the DNS cache

and restart docker-machine

The connection is slow compared with my normal wifi, but it allows me to work on my own when not at home or the office.


Can’t pull image on my ubuntu 13.04 #1470

How to Flush DNS Cache in OS X Yosemite with discoveryutil

facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Installing Git into a Synology NAS

I have a Synology NAS at home, and I was trying to install Git to reduce the number of private projects I have at Bitbucket.

After using the package manager to install Synology’s Git package, I tried to access Git remotely, but I was received with a message telling me that:

The solution was to create that directory in my user homes directory. After doing it, I got an interactive Git shell when I open an ssh session.

facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Updating Git in Ubuntu

Today I needed to update Git in my Ubuntu machines, and this is a note to myself to remember the process:

The command add-apt-repository needs some prerequisites as well (they were not installed in one of my machines):


facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Folding lines in Sublime

In one of my projects I am adding a good amount of logging to my code, with the result of getting a lot of distracting lines that end up hiding what is really going on.

I was searching for a plugin that can fold lines containing a text fragment in my editors, and found Filter Lines for Sublime.

After installing the plugin, I went to Edit | Code Folding | Fold with Regex  and entered ^((?!logger.).)*$  as my expression.

As a result, I went from

Sublime not folded


Sublime logger filtered

facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Time tracking with Toggl

My friend Magoo is using toggl for time tracking and decided to give it a go. I usually apply pomodoros when I am programming, but although they are ok to keep me focused in the task at hand, I don’t like the fact that after they are gone I don’t have any way to keep track of what I was doing (because the reality is that I usually get interrupted and have to jump to some other project at least for some minutes)

My first impression wasn’t the best, it looked like an early version of a promising tool but still rough in every sense, but after adding some workspaces, clients and projects it started to look more usable.

When I realised that they have an Android client, a desktop version, and a Chrome integration that can be used inside Trello my respect grew a lot more.

I don’t think it will be the last tool I try for the task (there are things that I am still missing), but it is a lot better than any other option I have tried.

facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

A tool to generate .gitignore files

For some time I have been using to create the .gitignore file used in my projects.

The content in many cases seems to be overkill (because it includes common libraries used by the language or tools selected), but it is better than the option of accidentally adding files to git that later need to be removed.


facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Performance problems in Vagrant when using host files into guest

I am working in an application that has to access a good number of resource files (good both in numbers and file sizes). As usual I am working in a Vagrant instance, and everything was going fine for the initial work.

But eventually the number of files passed from just testing to production, and while developing in my host the file access operation was ok (in the order of seconds to load everything), when the same code was running in Vagrant it took more than ten minutes to be ready.

At first I thought it was a memory problem, and increasing it to 6GB helped a bit (nine minutes instead of ten), it still didn’t cut.

I tried creating an instance in AWS, and surprising enough the performance was similar to running in my Mac.

I decided to copy all the files to the Vagrant instance, and then the problem was sorted, performance is on par with the host and AWS. That was it. Looking at the documentation, I noticed a shared directory option that is rsync, but I haven’t tried it, because I wrote a set of scripts that take care of preparing those resources to be deployed (both in Amazon and Vagrant) and dropping them on destination (which is a nice addition to my attempts to automate as much as I can both in development and deployment).

facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Changing the remote repository in git

I needed to move a project from Bitbucket to Github.

I was expecting a little dance to be made there, but it was pretty straightforward:

In a terminal, at the directory where I have my project, just did a


facebooktwittergoogle_plusredditpinterestlinkedinmailby feather