Simple script to record desktop in gif format. Kudos to TheMichaelHu, which script was used here as a base.
To use this script you need to install xrectsel (from /~https://github.com/lolilolicon/xrectsel/) and byzanz (sudo apt-get install byzanz).
Throw this script somewhere you like and make an alias like "gif" for easier usage.