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
#!/bin/bash | |
IFS=$'\n\t' | |
set -eou pipefail | |
# configure credentials | |
BBOD_API_KEY="" # bbConfig.configData.bbVideoDataMode | |
BBOD_PROFILE="" # bbConfig.profileID | |
BBOD_USER_AGENT="" # can probably be anything | |
# check whether the content id has been specified |
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
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
<?php | |
declare(strict_types=1); | |
namespace App\Database\Eloquent; | |
use Illuminate\Database\Eloquent\Builder; | |
use Illuminate\Support\Collection; | |
class ClassTableModel extends \Illuminate\Database\Eloquent\Model |
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 | |
IFS=$'\n\t' | |
HOSTNAME=${HOSTNAME:-$(hostname 2>/dev/null || echo 'local')} | |
# logging functions | |
log() { echo -n "[$(date +'%Y-%d-%m %H:%M:%S')] $HOSTNAME.$1"; } | |
debug() { echo -ne '\033[90m' >&2; log "DEBUG: $1" >&2; echo -e '\033[0m' >&2; } | |
info() { echo -ne '\033[34m' >&2; log "INFO: $1" >&2; echo -e '\033[0m' >&2; } | |
warn() { echo -ne '\033[33m' >&2; log "WARN: $1" >&2; echo -e '\033[0m' >&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
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 | |
} |
NewerOlder