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 pem from 'pem' | |
import fs from 'node:fs' | |
import http from 'node:http' | |
import https from 'node:https' | |
import net from 'node:net' | |
import { parse as parseURL } from 'node:url' | |
import tls, { SecureContext } from 'tls' | |
type Scheme = 'http' | 'https' |
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
#!/bin/bash | |
# Script to transcode Vaudeville 4K AVC1 media to 1080p X264/Opus so that Proton | |
# Experimental or Proton GE can play cutscene video and audio. | |
# | |
# Move the script to ${steam_library}/steamapps/common/Vaudeville and run. This | |
# script requires ffmpeg. If ffmpeg crashes with a segfault, re-run the script | |
# until it succeeds. Files which have successfully been transcoded already will | |
# be skipped on subsequent runs. | |
# |
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
#!/bin/bash | |
echo -n "detecting installed version: " | |
installed=$(dpkg -l | awk '$1 == "ii" && $2 == "discord" { print $3 }') | |
if [[ "$installed" == "" ]]; then | |
echo "error" | |
exit 1 | |
fi | |
echo "$installed" | |
echo -n "detecting latest version: " |
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
#!/bin/bash | |
set -euo pipefail | |
cd $(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P) | |
build_dir=$(mktemp -d) | |
cleanup() { | |
if [[ -d "$build_dir" ]]; then | |
rm -rf "$build_dir" | |
fi |
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
const crypto = require('crypto') | |
const fs = require('fs') | |
const readline = require('readline') | |
const rl = readline.createInterface({ input: process.stdin, output: process.stdout }) | |
const prompt = (query) => new Promise((resolve) => rl.question(query, resolve)) | |
void (async () => { | |
const args = process.argv.slice(2) |
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
#!/bin/bash | |
function finish { | |
if [[ "${rtspContainerId:-}" != "" ]]; then | |
docker kill "$rtspContainerId" | |
fi | |
if [[ "${ffmpegPid:-}" != "" ]]; then | |
kill "$ffmpegPid" | |
fi | |
} |
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
#!/bin/bash | |
# Script to transcode P4AU Microsoft ASF media to X264/Opus so that Proton Experimental | |
# or Proton GE can play cutscene video and audio. If there is no audio, go to | |
# "Options" > "System Options" and disable "Mute when not in focus" from within the game. | |
# | |
# Move the script to ${steam_library}/steamapps/common/P4U2 and run. This script requires | |
# ffmpeg. If ffmpeg crashes with a segfault, re-run the script until it succeeds. Files | |
# which have successfully been transcoded already will be skipped on subsequent runs. | |
# |
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
{ | |
"spectrum": { | |
"show": "false", | |
"n-points": "100", | |
"height": "100", | |
"use-custom-color": "false", | |
"fill": "true", | |
"show-bar-border": "true", | |
"scale": "1", | |
"exponent": "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
#!/bin/bash | |
IFS=$'\n\t' | |
set -euo pipefail | |
cd "~/Downloads/series" | |
function merge() { | |
jpnSrc="$1" | |
en1Src="$2" | |
en2Src="$3" |
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
#!/bin/bash | |
IFS=$'\n\t' | |
set -euo pipefail | |
cd "~/Downloads/series" | |
for f in $(ls -1 *.mkv); do | |
mkvpropedit "$f" \ | |
--edit track:s1 --set language=eng --set flag-forced=1 --delete flag-default \ | |
--edit track:s2 --set language=eng --set flag-default=1 |
NewerOlder