Category Archives: Reference to myself

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.

References

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

A tool to generate .gitignore files

For some time I have been using gitignore.io 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