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 json | |
r = requests.get("https://api.twitch.tv/helix/videos?user_id=USERID&type=archive", headers={"Client-ID":"CLIENTID"}) | |
j = json.loads(r.text) | |
for vod in j['data']: | |
print(vod['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
start "MyProgram" "C:/Program Files/Java/jre1.8.0_201/bin/java.exe" -jar MyProgram.jar | |
taskkill /F /FI "WINDOWTITLE eq MyProgram" /T |
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 subprocess | |
import io | |
out = subprocess.check_output("ia list " + input() + " -c size -g *.mp4", shell=True) | |
string = io.StringIO(out.decode("utf-8")) | |
count = 0 | |
total_bytes = 0 | |
for line in string: | |
count += 1 |
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 os | |
import sys | |
import json | |
import subprocess | |
import requests | |
import datetime | |
def log(msg): | |
sys.stdout.buffer.write((msg + "\n").encode('utf8')) |
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 os | |
import sys | |
import json | |
import subprocess | |
import datetime | |
rootdir = 'U:/Hoard' | |
def log(msg): | |
sys.stdout.buffer.write((msg + "\n").encode('utf8')) |
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
:ping | |
timeout 15 | |
set target=www.google.com | |
ping %target% -n 1 | find "TTL=" | |
if errorlevel==1 goto ping | |
DO SOMETHING |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Hashtag Mixer</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" type="text/css" href="style.css" /> | |
</head> | |
<body> |
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 | |
import time | |
def is_connected(): | |
try: | |
socket.create_connection(("www.google.com", 80)) | |
return True | |
except OSError: | |
pass | |
return False |
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
def send_telegram(msg, log=False): | |
r = None | |
try: | |
token = "" | |
if log: | |
token = "" | |
for start in range(0, len(msg), 4000): | |
data = {'chat_id': 123456789, 'text': msg[start:start+4000]} | |
r = requests.post("https://api.telegram.org/bot" + token + "/sendMessage", timeout=30, data=data) | |
r.raise_for_status() |
OlderNewer