Code snippets from the Electron Pi blog