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
# pypi:humblebundle has to deal with captchas. I can't be bothered. | |
import requests | |
import json | |
import subprocess | |
keys = [k["gamekey"] for k in json.loads(""" #paste contents of https://www.humblebundle.com/api/v1/user/order here | |
""") | |
# Open your browser's Network console while going to the above url, find the headers, paste them below | |
headers = {"Cookie": "", "User-Agent": ""} |
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
import requests | |
import sys | |
import os | |
from bs4 import BeautifulSoup as Soup | |
if len(sys.argv) < 2: | |
print sys.argv[0] + " <IP of server / ID of video> [ID of video] - Second arg is needed if first arg is IP" | |
sys.exit(2) | |
CVSERVER = "10.232.66.197" |
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
import socket | |
from requests import get | |
EXTEN = "1" | |
presence_api = "http://127.0.0.1:8081" | |
auth = ("me", "aa") | |
pbx_ip = "127.0.0.2" | |
def process_event(resp): | |
d = {} |
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
from pypresence import Presence # https://github.com/qwertyquerty/pypresence | |
from flask import * | |
from requests import get | |
from time import sleep | |
client_id = "556918123421368329" | |
RPC = Presence(client_id) | |
RPC.connect() | |
app = Flask(__name__) |
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
from pypresence import Presence # https://github.com/qwertyquerty/pypresence | |
from requests import get | |
from time import sleep | |
from sys import exit | |
client_id = "556909532417228919" | |
user = "blha303" | |
tautulli_instance = "https://tau.home.b303.me" # https://github.com/Tautulli/Tautulli | |
RPC = Presence(client_id) |
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 zlib | |
import os | |
import sys | |
import argparse | |
def crc32_file(filename): | |
with open(filename, "rb") as f: | |
return hex(zlib.crc32(f.read())).upper()[2:].zfill(8) |
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
<?php | |
// A script to check if a given port is open on the connecting host. | |
// IP ranges included are for cloudflare, replace with an array containing your proxy server IP ranges | |
// https://b303.me/portopen.php?port=80 | |
header("Content-Type: application/json"); | |
header("Access-Control-Allow-Origin: *"); | |
function cidr_match($ip, $ranges) { | |
$out = array(); | |
foreach ($ranges as $range) { | |
list ($subnet, $bits) = explode('/', $range); |
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
from plexapi.server import PlexServer | |
import sys | |
plex = PlexServer("http://172.16.17.10:32400") | |
now_playing = plex.query("/status/sessions") | |
if not now_playing: | |
print("Nobody's watching anything") | |
sys.exit(0) | |
sessions = [] | |
def hms(mil): | |
s,mil = divmod(int(mil), 1000) |
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 python | |
import os | |
import json | |
from hashlib import md5 | |
rootdir = os.getcwd() | |
CHECKSUMS = "checksums.json" |
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
<?php | |
# Because sometimes it's easier to load up a web browser. | |
# http://blha303.com.au/rainwave | |
# https://github.com/blha303/Rainwave-NowPlaying | |
header("Access-Control-Allow-Origin: *"); | |
$pagecontent = file_get_contents("http://ocr.rainwave.cc/"); | |
preg_match_all("/PRELOADED_APIKEY = '(.*?)'/", $pagecontent, $matches); | |
$url = "http://ocr.rainwave.cc/sync/2/init"; | |
$data = array('refresh' => 'full', |
NewerOlder