Ignoring updates in git

Some times you create a file like password.properties, that you commit with fake values. But then you want to update the content of that file and be sure that is never pushed to the remote.

To do that you have to follow the next steps:

  1. Create the fake password.properties with fake data.
  2. Commit the changes
  3. Add password.properties to your .gitignore
  4. Avoid future git updates with: git update-index –assume-unchanged password.properties

Create external table in Hive


Given several partitioned AVRO formatted files, together with the AVSC schema, we want to create a table in Hive.

We have hundreds of files in a directory partitioned by year and mont in the HDFS folder /data/mytable.db/mytable.
The folder structure is:

Continue reading

Exporting Docker images

Sometimes you want to move docker images from one machine to another and you don’t have a proper docker registry or it is not availabe.

Docker provides commands for that:

But these images can be really big in size, there is an alternative to save only the current container, no the image with all its historic data.

Continue reading

How to clear the CUPS print queue

To cancel a print job in the queue just use cancel. To see all the available jobs in the queue just use lpstat.

$ lpstat -o
HP-Officejet-7610-2-128 user2     240640   mié 09 mar 2016 11:07:14 CET
HP-Officejet-Pro-8620-137 jose             55296   dom 03 jul 2016 13:29:49 CEST
$ cancel -a HP-Officejet-7610-2-128
$ cancel -a HP-Officejet-Pro-8620-137

xterm-256color: Unknown terminal type


If you connect to a Solaris by ssh from Linux or MacOSX you can get the following message when using vi:

# vi httpd.conf
xterm-256color: Unknown terminal type
I don't know what kind of terminal you are on - all I have is 'xterm-256color'.
[Using open mode]
"httpd.conf" 705 lines, 24071 characters
# This is the main Apache HTTP server configuration file. It contains the


Define the TERM environment variable:

# export TERM=xterm

Now you can execute vi:

# vi httpd.conf

This change is valid just for the current Terminal session. If you want to make it permanent you have to add that export to your ~/.bashrc file. If you want to make the change permanent for all the users you can edit the /etc/profile file or add a new file in /etc/profile.d/