Skip to content

Instantly share code, notes, and snippets.

@0187773933
0187773933 / Windows10HoldMicrophoneVolumeConstant.py
Created April 12, 2020 02:09
Windows 10 Hold Microphone Volume Constant
from subprocess import check_output
from threading import Timer
import os
# https://www.python.org/downloads/windows/
# http://www.nirsoft.net/utils/nircmd.html
# http://www.nirsoft.net/utils/nircmd-x64.zip
NircCMD = os.path.join( "C:\\" , "Program Files" , "NirCmd" , "nircmd.exe" )
NircCMD = '"' + NircCMD + '"' + " setvolume 1 "
@0187773933
0187773933 / keybase.md
Created April 13, 2020 21:16
Keybase Verification

Keybase proof

I hereby claim:

  • I am 0187773933 on github.
  • I am 46742274 (https://keybase.io/46742274) on keybase.
  • I have a public key ASDsjgkXK1UQOGO34fPHSvx_waNXv7ozdQb1FMsdwymtHgo

To claim this, I am signing this object:

#!/usr/bin/env python3
import math
from geopy.geocoders import Nominatim
from geopy.distance import great_circle
from geopy.distance import geodesic
from geopy.distance import vincenty
geolocator = Nominatim( user_agent="lab6" )
# https://stackoverflow.com/a/52371976
def decimal_degrees_to_dms( deg , type='lat' ):
@0187773933
0187773933 / LyricsSearch.py
Last active May 15, 2020 07:00
Searches Genius.com Lyrics
import os
import sys
import re
import requests
from bs4 import BeautifulSoup
from pprint import pprint
from tqdm import tqdm
from concurrent.futures import ThreadPoolExecutor
from dotenv import load_dotenv, find_dotenv
@0187773933
0187773933 / CovidOhio.py
Created May 19, 2020 07:27
Prints Ohio Covid-19 Info from covidtracking.com
#!/usr/bin/env python3
import json
import requests
from pprint import pprint
from datetime import datetime , timedelta , time
from time import localtime, strftime , sleep
from pytz import timezone
eastern_tz = timezone( "US/Eastern" )
@0187773933
0187773933 / LocalPortForward.go
Created May 24, 2020 05:08
Our WIP Golang Port Forwarding Agent
package main
// https://github.com/longXboy/gotunnel
import (
"fmt"
"io"
"log"
"net"
"os"
@0187773933
0187773933 / MicrosoftWordCount.py
Last active June 14, 2020 23:07
Microsoft Word Progress Bar on Word Count
import sys, re, os, argparse
from docx import Document
import subprocess as sub
import time
from tqdm import tqdm
from pprint import pprint
import re
# https://raw.githubusercontent.com/SyntaxOverflowByte/word_count/master/word_count.py
@0187773933
0187773933 / castTwitchYoutubeToChromecast.sh
Last active July 2, 2020 09:22
Casts Twitch or Youtube or anything youtube-dl can Find to Chromecast via npm castnow
#!/bin/bash
# Quick Find Chromecast IP's
# python3 -c 'import pychromecast; print(pychromecast.get_chromecasts())'
# Then ARP Scan to Find Matching MacAddress
# arp -na
MacAddress="f0:ef:86:9:c3:30"
ChromecastIP=$(arp -na | grep -i $MacAddress | tail -1 | awk '{print $2}' | cut -d "(" -f2 | cut -d ")" -f1)
@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 }'