Fix to work on Linux, and add snippet.