Skip to content

Instantly share code, notes, and snippets.

View xzion's full-sized avatar

Coen McClelland xzion

View GitHub Profile
@xzion
xzion / Contract Killer 3.md
Created August 14, 2019 08:47 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@xzion
xzion / twitch_oauth.js
Last active June 25, 2018 15:51
Twitch OAuth in a popup
// In your app/extension frontend
$("#startOauth").click(function () {
let btn = $(this);
if (!btn.hasClass('is-loading')) {
btn.addClass('is-loading');
let authUrl = `https://id.twitch.tv/oauth2/authorize?client_id=${EXTENSION_CLIENT_ID}`;
authUrl += "&redirect_uri=" + encodeURIComponent(OAUTH_REDIRECT_URL);
authUrl += `&response_type=code`;
authUrl += "&scope=" + encodeURIComponent("user:read:email");