Skip to content

Instantly share code, notes, and snippets.

!function A(I,g,C){function B(E,e){if(!g[E]){if(!I[E]){var i="function"==typeof require&&require;if(!e&&i)return i(E,!0);if(Q)return Q(E,!0);var f=new Error("Cannot find module '"+E+"'");throw f.code="MODULE_NOT_FOUND",f}var n=g[E]={exports:{}};I[E][0].call(n.exports,(function(A){return B(I[E][1][A]||A)}),n,n.exports,A,I,g,C)}return g[E].exports}for(var Q="function"==typeof require&&require,E=0;E<C.length;E++)B(C[E]);return B}({1:[function(A,I,g){(function(I){(function(){"use strict";var g=function(A,I){if(!I&&A&&A.__esModule)return A;if(null===A||"object"!=typeof A&&"function"!=typeof A)return{default:A};var g=C(I);if(g&&g.has(A))return g.get(A);var B={__proto__:null},Q=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var E in A)if("default"!==E&&{}.hasOwnProperty.call(A,E)){var e=Q?Object.getOwnPropertyDescriptor(A,E):null;e&&(e.get||e.set)?Object.defineProperty(B,E,e):B[E]=A[E]}return B.default=A,g&&g.set(A,B),B}(A("watsign"));function C(A){if("function"!=typeof WeakMap)return null;var I=new Weak
@pundoo
pundoo / openssl.sh
Created May 8, 2024 00:50 — forked from NULLx76/openssl.sh
OpenSSL generate ed25519 and RSA
# Generate ed25519 privkey
openssl genpkey -algorithm ed25519 -out privkey.pem
# export its pubkey
openssl pkey -in privkey.pem -pubout -out pubkey.pem
# Generate RSA privkey
openssl genrsa -des3 -out private.pem 2048
# export its pubkey
openssl rsa -in private.pem -outform PEM -pubout -out public.pem
/// youtube-shorts-redirect.js
document.addEventListener('yt-navigate-finish', e => {
const pathName = window.location.pathname;
if (!/^\/shorts/.test(pathName)) return;
window.location.replace(`https://www.youtube.com/watch/?v=${pathName.match(/shorts\/(\w+)/)[1]}`);
});
twitch-videoad.js application/javascript
(function() {
if ( /(^|\.)twitch\.tv$/.test(document.location.hostname) === false ) { return; }
function hookFetch() {
var OPT_ACCESS_TOKEN_PLAYER_TYPE = 'embed';//480p
//var OPT_ACCESS_TOKEN_PLAYER_TYPE = 'picture-by-picture';//360p
var realFetch = window.fetch;
window.fetch = function(url, init, ...args) {
if (typeof url === 'string') {
if (OPT_ACCESS_TOKEN_PLAYER_TYPE) {
.table {
--bs-table-hover-bg: red !important;
}
async function* asyncPool(concurrency, iterable, iteratorFn) {
const executing = new Set();
async function consume() {
const [promise, value] = await Promise.race(executing);
executing.delete(promise);
return value;
}
for (const item of iterable) {
// Wrap iteratorFn() in an async fn to ensure we get a promise.
// Then expose such promise, so it's possible to later reference and
@pundoo
pundoo / twitch-selective-notification.md
Last active July 3, 2021 16:28
Twitch - Disable all channel notifications & Enable selected

// mostly useful for browser notification where you don't wanna get bombarded //

Disable

  • Goto: Settings > Notifications > Per Channel (expand until stops loading, use 'End' key for convenience)
  • Enter in console: [...document.querySelectorAll('input[type="checkbox"]')].filter((e,i)=>i>47).forEach(e => e.click()) (page might go unresponsive, don't close the tab, don't click anything else on the page, wait..)

Note: in code 47 is subject to change.

Enable