update gist demo to github API v3

Github has updated their API. I modified the demo so that it works
with v3.