Skip to content

Instantly share code, notes, and snippets.

@0187773933
0187773933 / YoutubeLiveStreamsFinder.py
Created July 6, 2020 23:47
Finds Live Stream URLS for Given Youtube Channel Ids using Pyppeteer
#!/usr/bin/env python3
from bs4 import BeautifulSoup
import requests
from pprint import pprint
import json
import asyncio
from pyppeteer import launch
def write_json( file_path , python_object ):
with open( file_path , 'w', encoding='utf-8' ) as f:
@0187773933
0187773933 / WindowsSSHViaTempKey.batch
Created July 30, 2020 10:04
Windows SSH into Wherever with Temporary Private Key as Single Command No ssh-agent
Windows SSH into Wherever with Temporary Private Key as Single Command No ssh-agent
WindowsSSHViaTempKey.batch
#1.) Store SSH Private Key in file on unix
#2.) Cat the file into hex bytes
cat private_key_file | od -A n -t x1
or
cat private_key_file | od -vt x1 | awk '{$1="";print}' | awk '{ gsub(/ /,""); print }'
@0187773933
0187773933 / OneDriveRemoverOSX.sh
Last active April 13, 2024 11:12
Completely Uninstalls OneDrive from Mac OSX and all settings just change username
#!/bin/bash
sudo pkill -9 OneDrive
sudo rm -rf /Applications/OneDrive.app/
sudo rm /Library/LaunchAgents/com.microsoft.OneDriveStandaloneUpdater.plist
sudo rm /Library/LaunchDaemons/com.microsoft.OneDriveStandaloneUpdaterDaemon.plist
sudo rm /Library/LaunchDaemons/com.microsoft.OneDriveUpdaterDaemon.plist
sudo rm -rf /Library/Logs/Microsoft/OneDrive
sudo rm /private/var/db/receipts/com.microsoft.OneDrive-mac.bom
@0187773933
0187773933 / twitchCustomSharable06AUG2020.js
Last active August 7, 2020 21:22
Userscript for Twitch Chat
// GLOBAL VARIABLES
// ==========================================================================
// Hiding Options
// =================================
var HIDE_GLITTER = true;
var HIDE_USERNAMES = true;
var MOUSE_OVER_USERNAMES = true;
var HIDE_MENTIONS = true;
var HIDE_INDIRECT_MENTIONS = true;
@0187773933
0187773933 / SSHFS_Mount_Local_to_Remote.sh
Last active August 14, 2020 08:21
SSHF Mount Local Directory on Remote Cloud VPS via SSH Remote Port Forward
# 3.) Mount From Local to Remote
# This Gets Run on Local Raspberry Pi
# It Mounts the "Local" Source Directory to the "Remote" Destination Directory
# Local = Raspberry Pi
# Remote = Cloud VPS
# However, there is confusion
# Since we are "Reverse Port Forwarding" ,
# the "local" and "remote" terms get switched after the initial ssh command is run
# So for the "sshfs" command , whatever you get the point
@0187773933
0187773933 / LatticeEnergy_Born-Land-Equation.py
Created August 17, 2020 09:51
Lattice Energy Calculation via Born-Lande Equation. Uses Sympy with Custom Units. Outputs LaTex
#!/usr/bin/env python3
from pprint import pprint
import sympy
from sympy import physics as sympy_physics
# https://github.com/sympy/sympy/tree/master/sympy
# /usr/local/lib/python3.8/site-packages/sympy/
# https://docs.sympy.org/latest/tutorial/printing.html
# https://docs.sympy.org/latest/modules/physics/units/examples.html?highlight=set_quantity_dimension#dimensional-analysis
# https://github.com/sympy/sympy/wiki/Unit-systems
@0187773933
0187773933 / TwitchFollowAllUsers.py
Last active August 21, 2020 03:01
Twitch Follow All Usernames in CSV Text File
#!/usr/bin/env python3
import requests
import sys
# You need two different client id's and oauth tokens.
# Or you have to be a fucking detective to decipher the shit show that is twitch api docs.
# Fuck twitch, youtube, spotify to hell. god damn fucking fucks.
# How god damn hard is it to make something reasonable
# Part One
@0187773933
0187773933 / LichessPuzzleMapDownloader.py
Last active September 20, 2020 19:04
Opens a Random Lichess Puzzle / Tactic in a Range You Specify via arg1 and arg2
#!/usr/bin/env python3
import time
import json
import requests
from pathlib import Path
from bs4 import BeautifulSoup
from tqdm import tqdm
from concurrent.futures import ThreadPoolExecutor
BASE_URL = "https://lichess.org/training"
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>MathJax example</title>
<script src="https://github.com/niklasvh/html2canvas/releases/download/v1.0.0-rc.7/html2canvas.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js">
@0187773933
0187773933 / Windows10MicrosoftWordDictationKeepAlive.py
Last active December 2, 2020 23:14
Restarts Microsoft Word Dictation After Silence Timeouts
import time
import pyscreeze
import pyautogui
# 1.) Probing For Location on Fullscreen on Vizio Monitor with Word Maximized
# Fullscreen Dimensions According to PIL = ( 1883 , 1019 )
# ( left , top , width , height )
# time.sleep(3)
# So its always 273 offset from Fullscreen
# pyscreeze.screenshot( 'probe.png' , region=( 1610 , 64 , 46 , 60 ) )