Author Archives: Thomas Cokelaer

fedora aeroplane mode always on

Under Fedora 23, somehow the aeroplane mode went on (plane icon shown in top right corner). I tried to switch it off but could not. After a reboot, the aeroplane is still switch on and there is no way to … Continue reading

Posted in Linux | Tagged | Leave a comment

packet_write_wait: Connection to XXX : Broken pipe

In general, I can connect to a remote machine via SSH without any troubles but occasionally in some particular setup, although I can connect to the remote machine and type commands in a shell, the connection is broken after a … Continue reading

Posted in Linux | Tagged | 11 Comments

pytest-cov collects no data on Travis

I recently switched from nosetests to pytest and pytest-cov for one of my Python project (http://easydev-python.readthedocs.io). Locally, everything seemed to work fine and once on Travis, all tests passed as expected. Yet, before the coverage report, I noticed this warning: … Continue reading

Posted in Python | Tagged , , | 12 Comments

Remove extension in a bash script

Imagine a bunch of files with extension fastq.dsrc, the following script will decompress the files by looping over the N files. One issue was to remove the extension in the script. See below the usage of // for filename in … Continue reading

Posted in Linux | Tagged | Leave a comment

git synchronisation of a forked repository

Let us assume you have forked a repository (from https://github.com/project/repository_name). You now have a local version at a given time of the repository repository_name. git pull https://github.com/project/repository_name cd repository_namegit pull https://github.com/project/repository_name cd repository_name Time flyes and you come back to … Continue reading

Posted in Uncategorized | Leave a comment

gimp: how to make a transparent background

How to make a transparent background/selection on an image using GIMP 1. Open your image. 2. Select the area you want to make transparent. Select the appropriate selection tool from the Tool window or the Tools – Selection Tools menu … Continue reading

Posted in photos | Tagged | 37 Comments

lost your linux root password ?

Lost your root password ? Under Fedora, at boot time, press e, select the kernel and add 1 (run level), which will let you enter into a shell session, where you can edit the /etc/passwd file to reset the password. … Continue reading

Posted in Linux | Tagged | Leave a comment

vim: multiple buffers

In order to work with several view ports of the same file in the same Vim window, type: :sp:sp You may also open another file in the same window. To do so issue the command:: :sp filename :sp filename To … Continue reading

Posted in Linux | Tagged | Leave a comment

vim: create function to remove white spaces

In the .vimrc file, add the following lines ( here ^M is a special character for the return carriage created using CTRL+V): #remove tabs function removeM() %s/^M// :endfunction   function removeWhiteSpace() %s/^ \+ $// %s/^ $// %s/ \+$// %s/ $// … Continue reading

Posted in Linux | Tagged | Leave a comment

yumex-dnf is locked

Under Fedora 23, starting yumex-dnf, I got a message that yumex-dnf was locked. I could not find any lock file in /var/cache/dnf and therefore was stuck. Finally, running yumex-dnf –exityumex-dnf –exit did kill the faulty process and could start yumex-dnf … Continue reading

Posted in Linux | Tagged | 11 Comments