simple uploader script for deluge, assign this script to be called on torrent complete and it will walk a directory and upload it to your google drive
install dependencies:
npm install googleapis async winston lodash mime twilio
#!/bin/bash | |
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04 | |
# Inspired from https://gist.github.com/faleev/3435377 | |
# Remove any existing packages: | |
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev | |
# Get the dependencies (Ubuntu Server or headless users): | |
sudo apt-get update |
#!/bin/bash | |
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 14.04 | |
# Copyright @ 2014 Shuen-Huei (Drake) Guan <drake.guan@gmail.com> | |
# References: | |
# * https://gist.github.com/xdamman/e4f713c8cd1a389a5917 | |
# * https://blog.dlasley.net/2013/05/install-ffmpeg-from-source/ | |
# * http://fermat-little-theorem-blog.logdown.com/posts/203069-solved-when-building-gpac-suffer-usr-local-lib-libswscalea-error-adding-symbols-bad-value |
# https://download.owncloud.org/download/repositories/stable/owncloud/ | |
wget -nv https://download.owncloud.org/download/repositories/stable/Debian_8.0/Release.key -O - | apt-key add - | |
echo "deb http://download.owncloud.org/download/repositories/stable/Debian_8.0/ /" >> /etc/apt/sources.list.d/owncloud.list | |
apt-get update | |
apt-get install owncloud |
#!/bin/sh | |
DOWNLOAD_DIR="${HOME}/ddl" | |
CONFIG_DIR="${HOME}/.aria2" | |
RPC_TOKEN="lol" | |
RPC_PORT="6800" | |
sudo apt-get update | |
sudo apt-get install -y aria2 ca-certificates |
#!/usr/bin/env python3 | |
import sys, os, socket | |
from socketserver import ThreadingMixIn | |
from http.server import SimpleHTTPRequestHandler, HTTPServer | |
HOST = socket.gethostname() | |
class ThreadingSimpleServer(ThreadingMixIn, HTTPServer): | |
pass |
On receiving NAS:
setcfg LOGIN "SSH AllowTcpForwarding" TRUE
reboot
On client to forward local port 8443 to the QNAP admin interface:
ssh user@host -L 8443:localhost:443
#!/bin/sh | |
######################################################################## | |
# | |
# Usage: via-ssh.sh [-v] [-d] [USER@]SERVER[:PORT] | |
# | |
# -v Provide verbose output. | |
# -d Send all UDP on the DNS port 53 to 127.0.0.1. | |
# USER User name to use for SSH; default is current user. | |
# SERVER Server to use for SSH. |
cat <<EOF | |
TYPE The following commands: | |
sysctl -w net.ipv4.conf.docker0.route_localnet=1 | |
iptables -t nat -N REDSOCKS | |
iptables -t nat -A REDSOCKS -d 0.0.0.0/8 -j RETURN | |
iptables -t nat -A REDSOCKS -d 10.0.0.0/8 -j RETURN | |
iptables -t nat -A REDSOCKS -d 127.0.0.0/8 -j RETURN | |
iptables -t nat -A REDSOCKS -d 169.254.0.0/16 -j RETURN | |
iptables -t nat -A REDSOCKS -d 172.16.0.0/12 -j RETURN | |
iptables -t nat -A REDSOCKS -d 192.168.0.0/16 -j RETURN |
[Unit] | |
Description=TurboVNC vncserver | |
After=network.target syslog.target | |
[Service] | |
User=labrax | |
Type=forking | |
ExecStartPre=/bin/sh -c '/opt/TurboVNC/bin/vncserver -kill :1 &>/dev/null || :' | |
ExecStart=/opt/TurboVNC/bin/vncserver -nthreads 2 -disconnect -idletimeout 0 -interframe -depth 24 -name bal :1 | |
ExecStop=/bin/sh -c '/opt/TurboVNC/bin/vncserver -kill :1 &>/dev/null || :' |