aly / twitch_emotes.py
0 likes
0 forks
1 files
Last active
A script to download all twitch emotes for a given channel. pipe to bash or something idk
| 1 | #!/usr/bin/env python3 |
| 2 | import requests |
| 3 | from bs4 import BeautifulSoup as Soup |
| 4 | from sys import argv |
| 5 | |
| 6 | headers = { |
| 7 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0' , |
| 8 | 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' , |
| 9 | 'Accept-Language': 'en-US,en;q=0.5', |
| 10 | 'Content-Type': 'application/x-www-form-urlencoded' , |
aly / scoophelper.py
0 likes
0 forks
1 files
Last active
flask app for easier windows setup scoop.alyssasmith.id.au
| 1 | #!/usr/bin/env python3 |
| 2 | from flask import * |
| 3 | |
| 4 | app = Flask(__name__) |
| 5 | |
| 6 | @app.route("/") |
| 7 | def index(): |
| 8 | buckets = "\n".join(f"scoop bucket add {bucket}" for bucket in request.args.get("buckets","").split(",")) if "buckets" in request.args else "" |
| 9 | packages = "\n".join(f"scoop install {package}" for package in request.args.get("pkgs","").split(",")) if "pkgs" in request.args else "" |
| 10 | return f"""Set-ExecutionPolicy RemoteSigned -scope CurrentUser |
aly / hlstranscode.sh
0 likes
0 forks
1 files
Last active
A script to launch a DO droplet with a script to download a file via http, transcode it using video2hls, upload the results to b2:ads-share/hls, then delete itself
| 1 | #!/bin/bash |
| 2 | # hlstranscode $URL |
| 3 | |
| 4 | cat >/tmp/cloud.conf <<EOFF |
| 5 | #!/bin/bash |
| 6 | apt-get update -qq |
| 7 | apt-get install ffmpeg -y -qq |
| 8 | curl https://rclone.org/install.sh | bash 2>/dev/null >/dev/null |
| 9 | |
| 10 | export ID=\$(curl http://169.254.169.254/metadata/v1/id 2>/dev/null) |
aly / archive_size
0 likes
0 forks
1 files
Last active
A tool to get the size of an archive.org bucket
| 1 | #!/usr/bin/env python3 |
| 2 | import xmltodict |
| 3 | import requests |
| 4 | |
| 5 | def sizeof_fmt(num, suffix='B'): |
| 6 | for unit in ['','Ki','Mi','Gi','Ti','Pi','Ei','Zi']: |
| 7 | if abs(num) < 1024.0: |
| 8 | return "%3.1f%s%s" % (num, unit, suffix) |
| 9 | num /= 1024.0 |
| 10 | return "%.1f%s%s" % (num, 'Yi', suffix) |
aly / acnhmusic.py
0 likes
0 forks
1 files
Last active
plays the acnh soundtrack synced to real time kinda
| 1 | #!/usr/bin/env python3 |
| 2 | # videos from https://tane.us/ac/nhIds.js, rename to hh00.m4a |
| 3 | # python3 acnhmusic.py | mpv - --loop-playlist=inf |
| 4 | from glob import glob |
| 5 | from datetime import datetime |
| 6 | from sys import stderr |
| 7 | |
| 8 | print("#EXTM3U") |
| 9 | |
| 10 | files = sorted(glob("*.m4a")) |