Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name Youtube Playlist Cleanser
// @version 2.1.0
// @description Removes watched videos from playlist either by %watched or all
// @author js6pak
// @include http*://*.youtube.com/*
// @include http*://youtube.com/*
// @run-at document-idle
// @homepageURL https://gist.github.com/js6pak/33bdefdefac09c387f55d08c5b9526fa
// @downloadURL https://gist.github.com/js6pak/33bdefdefac09c387f55d08c5b9526fa/raw/youtube-playlist-cleanser.user.js
@dglaude
dglaude / notes.md
Last active November 15, 2023 09:32
WebHID research notes
@monokee
monokee / define-component.js
Last active March 28, 2024 15:27
Tiny customElement wrapper that enables scalable web component architecture. Define custom elements with a configuration object that separates markup from css and javascript. Uses a slotted light DOM (no shadow DOM) to allow for powerful component extension, composition and easier styling with external stylesheets and global css variables. Expor…
/**
* Tiny customElement wrapper that enables scalable web component architecture.
* Define custom elements with a configuration object that separates markup from css and javascript.
* Uses a slotted light DOM (no shadow DOM) to allow for powerful component extension,
* composition and easier styling with external stylesheets and global css variables.
* Exports a component class that can be imported and explicitly used to be picked up by module bundlers.
* See comments for examples and GNU license below.
*/
export function defineComponent(name, config) {
@bcnzer
bcnzer / worker.js
Created October 15, 2018 09:31
Cloudflare Worker that uses Workers KV to get Authorization data. All authentication and authorization is done on the edge
addEventListener('fetch', event => {
event.respondWith(handleRequest(event))
})
/**
* Entry point of the worker
*/
async function handleRequest(event) {
try {
// Get the JWT