This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
https://dev.twitch.tv/docs/chat/chatbot-guide/ | |
*/ | |
import WebSocket from 'ws'; | |
const OAUTH_TOKEN = 'CHANGE_ME_TO_YOUR_OAUTH_TOKEN'; // Needs scopes user:bot, user:read:chat, user:write:chat | |
const CHAT_CHANNEL_USER_ID = 'CHANGE_ME_TO_THE_CHAT_CHANNELS_USER_ID'; // This is the User ID of the channel that the bot will join and listen to chat messages of |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<iframe src="https://www.twitch.tv/embed/MYCHANNEL/chat" id="chat_frame" style="width: 800px; height: 400px;"></iframe> | |
<script type="text/javascript"> | |
var parent = ['sites.google.com', 'www.gstatic.com', window.location.host]; | |
console.log(parent); | |
document.getElementById('chat_frame').setAttribute('src', document.getElementById('chat_frame').getAttribute('src') + '?parent=' + parent.join('&parent=')); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let url = new URL('some url'); | |
let params = [ | |
[ 'param_1', 'value' ], | |
[ 'param_2', 'value' ] | |
]; | |
url.search = new URLSearchParams(params).toString(); | |
fetch( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const app = express(); | |
app.listen(8080, function () { | |
console.log('booted express on', 8080); | |
}); | |
app.use('/', Rigs); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const app = express(); | |
let client_id = ''; | |
// no https:// on this | |
let ebs_domain = 'the.klitok.apiserver'; | |
/* | |
Setup Express to Listen on a Port | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<script src="https://extension-files.twitch.tv/helper/v1/twitch-ext.min.js"></script> | |
<link rel="stylesheet" href="style.css" /> | |
<title>Testing Extension</title> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* JSON Web Token implementation, based on this spec: | |
* http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-06 | |
* | |
* PHP version 5 | |
* | |
* @category Authentication | |
* @package Authentication_JWT | |
* @author Neuman Vong <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { Page, Card } from '@shopify/polaris'; | |
import { Form, FormLayout, TextField, Button } from '@shopify/polaris'; | |
class App extends React.Component { | |
constructor(props) { | |
super(props); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying that +barrycarlyon is my blockchain ID. https://onename.com/barrycarlyon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Wide-open CORS config for nginx | |
# | |
location / { | |
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Allow-Origin' '*'; | |
# |
NewerOlder