Part of my work consists of spreading what new features land on Nightly for our Twitter account and sometimes an animated Gif to show how a new feature works or how to activate it easier than trying to squeeze explanations into 140 characters.
Initially I was doing a video screencast and then converting the video into a Gif but I wasn't happy with the quality of the end result and the whole process was time consuming. I ended up searching for a better solution and found out about byzanz-record, a command that allows screencasting directly as a Gif and I think is easier to use for a Linux user than playing with ffmpeg. I ended up tweaking a script I found on Stackoverflow and this is what I use in the end:
Other people using Linux may have similar needs so maybe that will help you guys discover this command.