Install Docker and docker-compose on Raspberry Pi

Installing Docker requires adding the a repository with the updated version:

sudo apt update
sudo apt upgrade
sudo apt install apt-transport-https \
                 ca-certificates \
                 software-properties-common \
curl -fsSL | sudo apt-key add -
apt-key fingerprint 58118E89F3A912897C070ADBF76221572C52609D
sudo nano /etc/apt/sources.list

Add the line:

deb debian-stretch main

changing ‘stretch‘ with your version of Raspbian. You can check your version using lsb_release -cs.

sudo apt update
curl -sSL | sh
sudo usermod -aG docker pi
sudo reboot

For docker-compose, first we will need to install Berry Conda:

chmod +x
sudo reboot

And then install docker-compose using pip:

pip install docker-compose
sudo reboot

Installing Powerline in Ubuntu 18.04

Powerline is a “statusline plugin for vim, and provides statuslines and prompts for several other applications, including zsh, bash, fish, tmux, IPython, Awesome, i3 and Qtile”. It looks this cool (this is the most simply form):

Poweline for Bash

In combination with ZSH, it becomes an extremely powerful -and beautiful- tool.

To quickly install just Powerline for the bash:

sudo apt install powerline powerline-fonts

Add the following at the end of ~/.bashrc:

# Powerline
if [ -f /usr/share/powerline/bindings/bash/ ]; then
  powerline-daemon -q
  source /usr/share/powerline/bindings/bash/

Sorting the fonts:

mkdir -p ~/.fonts
wget -O ~/.fonts/Liberation\ Mono\ Powerline.ttf
wget -O ~/.fonts/Liberation\ Mono\ Powerline\ Bold.ttf
wget -O ~/.fonts/Liberation\ Mono\ Powerline\ Italic.ttf
wget -O ~/.fonts/Liberation\ Mono\ Powerline\ Bold\ Italic.ttf
fc-cache -vf ~/.fonts

Now, reload the terminal:

source ~/.bashrc


Column-navigation file manager

If you want a file manager with column navigation (macOS-alike) in linux, Pantheon File Manager is probably the best option. Pantheon File Manager is part of the Pantheon desktop, developed for elementary OS using Vala and the GTK3 toolkit. In Ubuntu and derivatives (e.g. Linux Mint) it’s as easy to install as:

sudo add-apt-repository ppa:elementary-os/stable
sudo apt update
sudo apt install pantheon-files

Done! You just need to search the app called ‘Files’ to launch it. It also displays a message asking if you want to make it the default file browser.

Dealing with PPA and GPG problems in Ubuntu and derivatives

PPAs are extremely useful, making installing and maintaining apps in Ubuntu and derivatives (such as Linux Mint) extremely easy. However, upgrading the system or problems/changes in the maintainer of the PPA can turn things into a pain the neck. Y PPA Manager is a tool from Web UPD8 designed specifically to keep all this under control in a easy way.

Some of the functions are:

  • List the packages available in a PPA added on your system
  • Download packages from PPAs without adding them
  • PPAs backup / restore, along with all the PPA keys
  • Update single repositories using a command line tool (by the way, when you add a PPA using Y PPA Manager, it’s updated without updating all the software sources) called “update-ppa” – usage example: “sudo update-ppa ppa:webupd8team/java”
  • Some options that should help you re-enable the working PPAs when upgrading to a newer Ubuntu / Linux Mint version
  • Remove duplicate PPAs
  • Unity quicklists / optional AppIndicator

Installing Y PPA Manager is as easy as copy and pasting the next lines:

sudo add-apt-repository ppa:webupd8team/y-ppa-manager
sudo apt update
sudo apt install y-ppa-manager

If you are having problems with expired GPG keys:

We know that feeling. The maintainer of a repository changes something and suddenly we start having problems with the GPG Keys. In my case, this happens -too frequently, under my point of view- with QGIS. Luckily we can fix invalid GPG keys with a single-line command:

sudo apt-key list | \
 grep "expired: " | \
 sed -ne 's|pub .*/\([^ ]*\) .*|\1|gp' | \
 xargs -n1 sudo apt-key adv --keyserver hkp:// --recv-keys

Command explanation:

  • sudo apt-key list Lists all keys installed in the system.
  • grep “expired: “ Leaves only lines with expired keys.
  • sed -ne ‘s|pub .*/\([^ ]*\) .*|\1|gp’ Extracts keys.
  • xargs -n1 sudo apt-key adv –keyserver hkp:// –recv-keys Updates the expired keys with those found in the Ubuntu key server.


Fix and prevent Windows continuously changing UEFI order

Having a dual-boot machine with Windows 8 or Windows 10 and Linux is frustrating, because Windows changes continuously the UEFI booting order, thus preventing GRUB to load. This usually happens after an update.

This command executed from Windows’ Command Prompt (as an administrator) seems to fix the problem for Ubuntu and derivatives:

bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi

For other distros, you will need to identify first which .efi file is needed to boot. More information about the commands available for bcdedit is available in the Window’s IT center‘s website.

MEAN.JS and the CRUD Module Sub-Generator

MEAN.JS still needs to pulish a few things. For example, the compatibility with NODE 7.x. But a part from that, there is the CRUD Module Sub-Generator, which fails to properly add entries to the menu, and it is something that should be working out of the box.

Basically, you can use this generator for automatically creating the files needed for a CRUD interaction, but if you choose to add an entry to the menu… The website stops working and the only thing you can see is a blank page.

I was able to find more people with the same problem, for example:

But just when I was about to delete the project and find an alternative to MEAN.JS, I found the solution to the problem:

in client\config\customers.client.config.js reemplace this line:

menuConfig.$inject = [‘menuService’];

with this:

menuConfig.$inject = [‘Menus’];

Thanks StackOverflow!

Fix Telegram not showing accents in elementary OS

Diving in the Internet I found some answers, mainly related with IBus. However, it seems like they are not working with elementary OS 0.4 Loki.

The workaround is simple, just edit the file of the launcher corresponding to Telegram:

nano .local/share/applications/telegramdesktop.desktop

and change this line:

Exec=/home/YOUR-USER/Downloads/Telegram/Telegram -- %u

to look like this other one:

Exec=env QT_IM_MODULE=xim /home/YOUR-USER/Downloads/Telegram/Telegram -- %u

That should do the trick. But maybe you need to install a couple of IBus dependencies first? Just in case:

sudo apt install ibus-gtk ibus-gtk3 ibus-qt4

Computer Science and visually impaired people

One day, they tell you that you have cancer. Your life changes. Then, while fighting against it, you go blind. In just 24 hours you can’t see almost anything. However, that’s not stopping you to reach your dreams. This is the story of my friend Rafael Cantos, and in this article he tells us how he, a person with a huge visual impairment, manages to code. Because he, a person that managed to have a title in Computer Sciences, and a masters in the same field, even dealing with a huge visual impairment, is discovering how the real challenge lays in overcoming prejudices.

The article linked in this post is written in Spanish, but Google Translator can help you with that.

Command line, human-readable, disk usage analyser

It happens continuously. We have a server with no graphical interface, and our disk quota is gone in God knows what.

We could use different commands to identify the source of the problem, roll perception checks, roll will checks… Or we can use NCurses Disk Usage. Beautifully simple, it fulfils more than correctly this task.

Easy to install:

sudo apt install ncdu

And easy to use:


Piece of cake.