Skip to content

Instantly share code, notes, and snippets.

@0187773933
0187773933 / GoogleMapsSearchWithFilters.py
Last active July 30, 2025 12:56
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
@0187773933
0187773933 / http.conf
Last active June 25, 2023 14:41
Apache http.conf MP4 Streaming Config
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
@0187773933
0187773933 / MacOSXPyEnvInstall.sh
Created June 20, 2023 12:41
Mac OSX PyENV Install
#!/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
@0187773933
0187773933 / ADBWatchEvents.py
Last active June 17, 2023 01:57
ADB Watch Events for Later Replay
#!/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 )
@0187773933
0187773933 / MDToJPEG.py
Last active June 21, 2023 12:01
Markdown + KaTeX + mhchem to JPEG Converter
#!/usr/bin/env python3
# brew install wkhtmltopdf
# pip install imgkit markdown
import os
import imgkit
import markdown
import asyncio
import nest_asyncio
import time
from pyppeteer import launch
@0187773933
0187773933 / RenderMDWithKaTeX.html
Created June 7, 2023 20:27
Render MD with KaTeX to HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>MD + Katex Render Test</title>
<script defer src="https://39363.org/CDN/marked.min.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-3UiQGuEI4TTMaFmGIZumfRPtfKQ3trwQE2JgosJxCnGmQpL/lJdjpcHkaaFwHlcI" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-G0zcxDFp5LWZtDuRMnBkk3EphCK1lhEf4UEyEM693ka574TZGwo4IWwS6QLzM/2t" crossorigin="anonymous"></script>
@0187773933
0187773933 / ConvertGoogleSavedPlacesToKML.py
Last active February 28, 2024 15:39
Convert Google Takeout Saved / Starred Places GeoJSON to KML File
#!/usr/bin/env python3
import sys
import json
from pygeoif.geometry import Point
from fastkml import kml
from pprint import pprint
from pathlib import Path
import googlemaps
from urllib.parse import urlparse , parse_qs , unquote
@0187773933
0187773933 / DiscordBotArchiveAllGuilds.py
Last active September 15, 2023 21:39
Python Script to Download All Messages In All Categories in All Guilds the Bot Has Joined
#!/usr/bin/env python3
import requests
from pprint import pprint
from box import Box
from pathlib import Path
import shutil
import json
from tqdm import tqdm
from concurrent.futures import ThreadPoolExecutor
import urllib.parse
@0187773933
0187773933 / TwitchHelix.sh
Created May 25, 2023 23:44
Twitch Helix API Stuff
#!/bin/bash
CLIENT_ID="asdf"
CLIENT_SECRET="asdf"
REDIRECT_URI="http://localhost:3033/"
# 1.) refresh client credentials ( this is a less permissive client credential auth token )
# curl -s -X POST 'https://id.twitch.tv/oauth2/token' \
# -H 'Content-Type: application/x-www-form-urlencoded' \
# -d 'client_id=$CLIENT_ID&client_secret=$CLIENT_SECRET&grant_type=client_credentials'