I personally use and recommend LICEcap.
![gif using LICEcap of LICEcap](https://cdn.statically.io/img/i.sstatic.net/pzC4T.gif)
- Great interface: select a region of the screen and set the frame rate and destination for the gif.
- No time limit on length of gif.
- OS X and Windows (can use Wine for Linux).
LICEcap also allows some further gif customisation, including adding title frame with custom duration to the gif, setting a pause hotkey and repeat count (as opposed to the default infinite repeat).
![gif settings](https://cdn.statically.io/img/i.sstatic.net/MluGq.png)