Skip to content

Instantly share code, notes, and snippets.

@0187773933
0187773933 / ChromeComicSans.js
Last active October 4, 2023 11:12
Google Chrome Userscript - Comic Sans
// ==UserScript==
// @name Chrome Comic Sans
// @namespace http://your.namespace/
// @version 0.1
// @description Comic Sans
// @match *://*/*
// @grant GM_addStyle
// @run-at document-start
// ==/UserScript==
@0187773933
0187773933 / PilotClassListEmailExtractor.js
Created August 27, 2023 15:05
Pilot Class List Email Extractor
( ()=> {
const listElement = document.getElementById('BccAddresses$control');
const listItems = listElement.querySelectorAll('.d2l-multiselect-choice span');
const emailArray = [];
listItems.forEach((item) => {
const text = item.innerText;
const match = text.match(/"(.+)" <(.+)>/);
if (match) {
emailArray.push(`"${match[1]}" <${match[2]}>`);
}
@0187773933
0187773933 / ConvertYouTubePlaylistToM3U8.sh
Created August 18, 2023 16:35
Converts YouTube Playlist ID to M3U8 - Urls Good for 6 Hours
#!/bin/bash
# Check if the input playlist ID and API key are provided
if [ -z "$1" ] || [ -z "$2" ]; then
echo "Usage: $0 <playlist_id> <api_key>"
exit 1
fi
playlist_id="$1"
api_key="$2"
@0187773933
0187773933 / TwitchBlackSquareOverlay.js
Last active September 4, 2023 10:55
Twitch Black Square Overlay - Hide On Screen Chat
// ==UserScript==
// @name Twitch Black Square Overlay - Chess24
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Overlay a black square on Twitch video streams
// @author You
// @match *://*.twitch.tv/chess24*
// @grant none
// ==/UserScript==
@0187773933
0187773933 / PixelDataFromDisplayMedia.js
Created August 15, 2023 15:59
Attempts to Get Pixel Data from Display Media ? Somethings Wrong
( async ()=> {
let stream = await navigator.mediaDevices.getDisplayMedia( { video: true } );
console.log( stream );
let video = document.createElement('video');
video.srcObject = stream;
video.play();
let canvas = document.createElement('canvas');
let ctx = canvas.getContext('2d');
@0187773933
0187773933 / twitchIINABlackBox.sh
Last active August 15, 2023 13:56
Draws a Black Box Overtop of a Twitch Stream
#!/bin/bash
# twitchIINABlackBox playirresponsibly bottom-left 600 400 0 20
# twitchIINABlackBox chess24 bottom-left 800 110 580 0
if [[ "$1" == *"twitch.tv"* ]]; then
url="$1"
else
url="https://twitch.tv/$1"
fi
@0187773933
0187773933 / PhDStipendsDownloader.py
Created August 1, 2023 20:30
PhD Stipends Dot Com Data Downloader
#!/usr/bin/env python3
import requests
import json
def write_json( file_path , python_object ):
with open( file_path , 'w', encoding='utf-8' ) as f:
json.dump( python_object , f , ensure_ascii=False , indent=4 )
def read_json( file_path ):
with open( file_path ) as f:
@0187773933
0187773933 / WebPackGetChunk.js
Created July 14, 2023 22:28
Web Pack Get Chunk By ID
( ()=> {
function get_chunk( chunk_id ) {
for ( let chunk_key in window.webpackChunk ) {
if ( window.webpackChunk[ chunk_key ][ 1 ].hasOwnProperty( chunk_id ) ) {
return window.webpackChunk[ chunk_key ][ 1 ][ chunk_id ];
}
}
}
let chunk = get_chunk( 640151 );
console.log( chunk );
@0187773933
0187773933 / GoogleMapsSearchWithFilters.py
Last active January 24, 2025 12:33
Google Maps Location Search With Filters
#!/usr/bin/env python3
import requests
import json
import time
API_KEY = "asdf"
def miles_to_meters( miles ):
return ( miles * 1609.34 )
@0187773933
0187773933 / VideoExtractTransitionFrames.py
Created June 22, 2023 14:32
Extracts Transition / PowerPoint Frames from Video
#!/usr/bin/env python3
import cv2
import imagehash
import sys
from PIL import Image
import numpy as np
from pathlib import Path
from natsort import humansorted
# pip install opencv-python ImageHash pillow natsort