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
// ==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== |
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
( 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'); |
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
#!/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 |
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
#!/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: |
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
( ()=> { | |
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 ); |
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
#!/usr/bin/env python3 | |
import requests | |
import json | |
import time | |
API_KEY = "asdf" | |
def miles_to_meters( miles ): | |
return ( miles * 1609.34 ) |
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
#!/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 |
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
ServerRoot "/usr/local/apache2" | |
Listen 80 | |
LoadModule mpm_event_module modules/mod_mpm_event.so | |
LoadModule authn_file_module modules/mod_authn_file.so | |
LoadModule authn_core_module modules/mod_authn_core.so | |
LoadModule authz_host_module modules/mod_authz_host.so | |
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so | |
LoadModule authz_user_module modules/mod_authz_user.so |
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
#!/bin/bash | |
echo $SHELL | |
chsh -s /bin/bash | |
# iTerm --> Settings --> Profiles --> Default --> General --> Command = Login Shell | |
# https://github.com/pyenv/pyenv | |
brew update && brew install pyenv | |
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile | |
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile |
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
#!/usr/bin/env python3 | |
import subprocess | |
import re | |
import threading | |
import time | |
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 ) |