running:
bash create-vod-hls.sh beach.mkv
will produce:
beach/
|- playlist.m3u8
|- 360p.m3u8
#!/usr/bin/env bash | |
# | |
# ###################################################################### | |
# Start Tor and switch the system-wide proxy settings in macOS | |
# ---------------------------------------------------------------------- | |
# Usage: | |
# `./tor.sh` in Terminal, kill with ctrl + c | |
# ---------------------------------------------------------------------- | |
# Source: | |
# https://kremalicious.com/simple-tor-setup-on-mac-os-x/ |
# delete the bad host key from the previous ssh command | |
purgehostkey() { | |
cmd=$history[$((HISTCMD-1))] | |
lineno=$(eval $cmd 2>&1 | grep -oP 'known_hosts:\K\d+') | |
known_hosts=~/.ssh/known_hosts | |
host=$(sed -n "${lineno}p" $known_hosts | cut --delimiter=' ' --fields=1) | |
sed -i -e "${lineno}d" $known_hosts | |
echo "Deleted $host from known_hosts:$lineno 🖥️🔑💥" | |
eval $cmd -o StrictHostKeyChecking=accept-new | |
} |
running:
bash create-vod-hls.sh beach.mkv
will produce:
beach/
|- playlist.m3u8
|- 360p.m3u8
#user nobody; | |
worker_processes 1; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
pid /var/run/nginx.pid; | |
events { |
[Unit] | |
Description=NBXplorer daemon | |
Requires=bitcoind.service | |
After=bitcoind.service | |
[Service] | |
ExecStart=/usr/bin/dotnet "/home/cloudgenius/NBXplorer/NBXplorer/bin/Release/netcoreapp3.1/NBXplorer.dll" -c /home/cloudgenius/.nbxplorer/Main/settings.config | |
User=cloudgenius | |
Group=dialout | |
Type=simple |
// https://developers.cloudflare.com/workers/about/ | |
// https://tutorial.cloudflareworkers.com | |
// | |
// A Service Worker which adds Security Headers. | |
// Checks: | |
// https://securityheaders.io/ | |
// https://observatory.mozilla.org/ | |
// https://csp-evaluator.withgoogle.com/ | |
// https://hstspreload.org/ | |
// https://www.ssllabs.com/ssltest/ |
# make temp file that will cause iocage to install some packages | |
echo '{"pkgs":["ca_root_nss"]}' > /tmp/pkg.json | |
# create jail | |
iocage create -n "rslsync" -p /tmp/pkg.json -r 11.3-RELEASE ip4_addr="vnet0|192.168.1.222/24" defaultrouter="192.168.1.1" vnet="on" allow_raw_sockets="1" boot="on" | |
# remove the temp file | |
rm /tmp/pkg.json | |
#make our iocage directories | |
iocage exec rslsync mkdir -p /config | |
iocage exec rslsync mkdir -p /mnt/syncdata |
#!/bin/bash | |
S3_BUCKET_NAME=$1 | |
CF_ID=$2 | |
# Sync all files except for service-worker and index | |
echo "Uploading files to $S3_BUCKET_NAME..." | |
aws s3 sync build s3://$S3_BUCKET_NAME/ \ | |
--acl public-read \ | |
--exclude service-worker.js \ |
terraform init
terraform apply -var="do_token=$(cat $HOME/digitalocean-access-token)"
gateway_url = http://178.128.39.201:8080/
login_cmd = faas-cli login -g http://178.128.39.201:8080/ -p rvIU49CEcFcHmqxj
# Created on Mon Jan 13 19:16:24 PST 2020 | |
Host CloudGenius | |
HostName ec2-52-24-156-230.us-west-2.compute.amazonaws.com | |
ForwardAgent yes | |
User ubuntu | |
StrictHostKeyChecking no | |
IdentityFile /home/jkobie/.ssh/DoNotUseThisKey-CloudGeniusOnly.pem | |
Host ec2-52-24-156-230.us-west-2.compute.amazonaws.com | |
HostName ec2-52-24-156-230.us-west-2.compute.amazonaws.com | |
IdentityFile /home/jkobie/.ssh/DoNotUseThisKey-CloudGeniusOnly.pem |