Did you ever delete hours of progress by carelessly using git reset –hard? I did, so I spent the next hours searching for a way to restore my hard work which I will share with you here. This solution only works for files which got staged before the reset (e.g. by git add *) and […]

When taking pictures of moving objects or scenes it would often be awesome to convert them into an animated gif. Unless you used a tripod you will still have slight camera movements and shifts which are then visible in the gif. There is a geekoverdose post which describes how to use the hugin commandline-interface for […]

After searching a while for a commandline music-players for linux and testing them I just settled down with cmus. Cmus is a feature rich music-player built using ncurses which provides a nice commandline based GUI. Since I wanted a lyric module for the player I added lyvi which is a simple command-line lyrics viewer for […]

One of my frequent use-cases is to play music from a folder and all it’s sub-folders in random order. This can be achieved simply using vlc. vlc /your/location/ -ZL –no-repeat The -Z is for shuffle, -L is for loop and –no-repeat is needed so that it repeats all, not just a single file. For further […]

In this post I’ll describe how to enable autoscroll for a JTextArea in a Java Swing GUI. Some GUI applications raise the need to incrementally inform the user about the state of the program, which is particularly important when starting time consuming operations. Providing a user with up-to-date progress information might prevent him from thinking […]

Working with sequence/alignment-data, you sometimes need to filter an existing .bam file e.g. for data reduction or read extraction. In this post we describe and implement one way to filter the content of .bam files by a given chromosome as well as by a given range for read start positions. A straight forward and flexible […]