Ending 1: *Hyun-ae leaves home, in the care of a new friend
tbd
| #!/bin/bash | |
| # hlstranscode $URL | |
| cat >/tmp/cloud.conf <<EOFF | |
| #!/bin/bash | |
| apt-get update -qq | |
| apt-get install ffmpeg -y -qq | |
| curl https://rclone.org/install.sh | bash 2>/dev/null >/dev/null | |
| export ID=\$(curl http://169.254.169.254/metadata/v1/id 2>/dev/null) |
| #!/usr/bin/env python3 | |
| # let's say you have a bucket on b2 containing videos which you've converted, | |
| # using https://github.com/vincentbernat/video2hls, to a HLS file structure | |
| # in subdirectories named for the sha1 sum of the original file. | |
| # This script would produce an index of files available via HLS by parsing | |
| # the output of `b2 ls BUCKET DIRECTORY --json --recursive` (available as | |
| # data.json), returning json like | |
| # [ | |
| # ["d5db29cd03a2ed055086cef9c31c252b4587d6d0", | |
| # "filename.mp4"], |
| // We support the GET, POST, HEAD, and OPTIONS methods from any origin, | |
| // and allow any header on requests. These headers must be present | |
| // on all responses to all CORS preflight requests. In practice, this means | |
| // all responses to OPTIONS requests. | |
| const corsHeaders = { | |
| "Access-Control-Allow-Origin": "*", | |
| "Access-Control-Allow-Methods": "GET,HEAD,POST,OPTIONS", | |
| "Access-Control-Max-Age": "86400", | |
| } |
| #!/usr/bin/env python3 | |
| import xmltodict | |
| import requests | |
| def sizeof_fmt(num, suffix='B'): | |
| for unit in ['','Ki','Mi','Gi','Ti','Pi','Ei','Zi']: | |
| if abs(num) < 1024.0: | |
| return "%3.1f%s%s" % (num, unit, suffix) | |
| num /= 1024.0 | |
| return "%.1f%s%s" % (num, 'Yi', suffix) |
| #!/usr/bin/env python3 | |
| # videos from https://tane.us/ac/nhIds.js, rename to hh00.m4a | |
| # python3 acnhmusic.py | mpv - --loop-playlist=inf | |
| from glob import glob | |
| from datetime import datetime | |
| from sys import stderr | |
| print("#EXTM3U") | |
| files = sorted(glob("*.m4a")) |
| #!/usr/bin/env python3 | |
| from sys import stderr, argv, exit | |
| import subprocess | |
| from math import floor | |
| def hms(inp): | |
| s,ms = divmod(inp,1) | |
| m,s = divmod(s,60) | |
| h,m = divmod(m,60) | |
| return f"{h:02.0f}:{m:02.0f}:{s:02.0f}.{floor(ms*100):02.0f}" |
Ending 1: *Hyun-ae leaves home, in the care of a new friend
tbd
| #!/bin/bash | |
| domain="alyssasmith.id.au" | |
| if [ -z "$1" ]; then | |
| region="syd" | |
| else | |
| region="$1" | |
| fi | |
| if [ -z "$2" ]; then | |
| size="vc2-4c-8gb" | |
| else |
| #!/bin/bash -x | |
| # https://gbatemp.net/download/batch-cia-3ds-decryptor.35098/ | |
| # adapted from the .bat file in this zip | |
| # requires wine | |
| # intended for e.g Homebrew.Game.Title/asdf.rar, produces Homebrew.Game.Title.3ds as decrypted output | |
| _PWD=$(pwd) | |
| DECRYPTPATH=/root | |
| cd "$1" | |
| unrar -o+ x $(find . -name *.rar | head -n1) | |
| echo | wine $DECRYPTPATH/decrypt.exe *.3ds |
| Set-ExecutionPolicy RemoteSigned | |
| New-Item -path $profile -type file -force | |
| Add-Content -path $profile -value '[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls"' | |
| & $profile | |
| iwr -useb get.scoop.sh | iex | |
| scoop install git | |
| scoop update | |
| iwr https://github.com/PowerShell/Win32-OpenSSH/releases/download/v8.1.0.0p1-Beta/OpenSSH-Win64.zip -outfile "C:\Program Files\OpenSSH-Win64.zip" | |
| expand-archive -path "C:\Program Files\OpenSSH-Win64.zip" -destinationpath "C:\Program Files" | |
| move-item "C:\Program Files\OpenSSH-Win64" "C:\Program Files\OpenSSH" |