curl --location 'https://id.twitch.tv/oauth2/token' \
--form 'client_id="{{twitch-client-id}}"' \
--form 'scope="{{twitch-scopes}}"' \
--form 'device_code="{{TWITCH_DEVICE_CODE}}"' \
--form 'grant_type="urn:ietf:params:oauth:grant-type:device_code"'
This file contains hidden or 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
addEventListener('fetch', event => { | |
event.respondWith(handleRequest(event.request)); | |
}); | |
async function handleRequest(request) { | |
const url = new URL(request.url); | |
const path = url.pathname; | |
if (request.headers.get('Upgrade') === 'websocket') { | |
return fetch(request, { |
This file contains hidden or 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> | |
<head> | |
<script> | |
sessionStorage.redirect = location.href; | |
const projectPages = true; // If you're using the base .github.io domain without a path (i.e. <name>.github.io is your home page), set this to false | |
const l = window.location; | |
const repo = projectPages ? '/' + l.pathname.split('/')[1] : ''; | |
l.replace( | |
l.protocol + '//' + l.hostname + (l.port ? ':' + l.port : '') + repo |
This file contains hidden or 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
html.xmas .frosting::before { | |
content: ''; | |
display: block; | |
position: absolute; | |
top: -7px; | |
left: -3px; | |
right: 0; | |
z-index: 999; | |
height: 23px; | |
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAXCAYAAACS5bYWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABFpJREFUeNrUV0tIo1cUvpkYjQ4xxSA6DxuNqG0dtaUKOgs3s6i0dFd3pSsXdjeIixakiGA34sZuXCkoONLFwJTK4GMYLYXg29gatTpiXurkbd7vv9/5ub+IxuhA7eiFQ5Kbc8/57ne/e87/ywRBYLdl3GG3aNwqsLJ0k0tLS+fmcnNzWUVFBVMoFGx2djarvLxcm5OTw+bm5iytra2xc4ExNjY27iqVyvvwK6CpeDzuCYVC1urq6qDA9UcfPp+PHR4esmAwKK6tr68/l5/8rgQ2Ozub1dbWyiYmJooaGxt/VqvV38jlchX9l0qlwoFA4DWS/RKLxRxFRUVf5+XlPcaaT2AP0sVPJBL2SCRiAPBpu93+vKamZo/Ae71eZjabWV1dXVqw7CKwp43ksrCw8Bhg7MJ/PLDZ5PHx8cz29vYT5JGD/bSYLgTrcDgYdk6siSc6NjZWDaAe4ZoHQL+cmZnRpZPnhWDpD8kw7uKo9ML/NMCsd2tr61vkzboMrEyv138M7TyLRqMWMBsX3sMgaZhMpp+AR5EJrCocDpuEGzKg4x8khs+CVWxubvZfR9JkMik4nU7BarUKLpeLmLsKuwIqTLynp4fqmIzASrqQT09Pf1VVVfX0KsWZ6uHBwQHTaDSsoKAgo6/H4xHLEcrVyRwuEisrKzs5XrrIVAVwiUVDKRRrL+YI32ewdVhMApuHWvcj6vids6J2u90MF4yBHUZNgKoE |
This file contains hidden or 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
<script setup lang="ts"> | |
import {isXmasTime} from "@/lib/dateTime"; | |
// add xmas to your html class | |
</script> | |
<template> | |
<div v-if="isXmasTime()" | |
class="z-1199 absolute pointer-events-none opacity-50"> | |
<template v-for="i in Array.from(Array(30).keys())" :key="i"> | |
<div class="snowflake"></div> |
This file contains hidden or 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
[ApiController] | |
[Tags("Media")] | |
[ApiVersion(1.0)] | |
[Authorize] | |
[Route("api/v{version:apiVersion}")] | |
public class HomeController : BaseController | |
{ | |
[HttpGet] | |
[Route("home")] | |
public async Task<IActionResult> Home() |
This file contains hidden or 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
$noop( | |
######################################################################## | |
# # | |
# Picard File Naming Script 2020-11-15 # | |
# Bob Swift [rdswift] # | |
# # | |
# License: GPLv3.0 # | |
# # | |
######################################################################## | |
# |
This file contains hidden or 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 config = { | |
settings: { | |
TWITCH: { | |
USERNAME: '', | |
OAUTH_TOKEN: '', | |
CHANNEL_NAME: '' | |
}, | |
}, | |
} |
This file contains hidden or 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
export interface CreateElement<E extends Element> { | |
addClasses: (names: string[]) => AddClasses<E>; | |
appendTo: <P extends Element>(parent: P) => AddClassesReturn<E>; | |
prependTo: <P extends Element>(parent: P) => AddClassesReturn<E>; | |
get: () => E; | |
} | |
export interface AddClasses<E extends Element> { | |
appendTo: <P extends Element>(parent: P) => AddClassesReturn<E>; | |
prependTo: <P extends Element>(parent: P) => AddClassesReturn<E>; |
Set the variables twitch-client-id
and witch-client-secret
as secret variables in your Postman environment,
curl --location 'https://id.twitch.tv/oauth2/token' \
--header 'Content-Type: application/json' \
--data '{
"client_id": "{{twitch-client-id}}",
"client_secret": "{{twitch-client-secret}}",
"grant_type": "client_credentials",
"scope": "the scopes you need"
}'
NewerOlder