Skip to content

Instantly share code, notes, and snippets.

@stefanschmidt
stefanschmidt / daily-show-downloader.sh
Last active February 21, 2017 19:46 — forked from anonymous/gist:276271
The Daily Show Downloader
#!/bin/bash
#
# This script depends on curl and rtmpdump.
# For playback I recommend mplayer.
# Suggestions are welcome.
#
RTMPDUMP="rtmpdump" # the name of the binary
set -eu
@timothyandrew
timothyandrew / README.md
Last active December 16, 2023 17:05
Set up a seedbox (on DigitalOcean – Ubuntu) really quick

Introduction

  • This script lets you set up and use a temporary DigitalOcean droplet to download torrent files.
  • Once downloaded, they can be streamed down to your local machine.
  • This uses transmission-cli for the torrent client, and nginx to serve files.

Setup on Local Machine

  • This assumes that you have a DigitalOcean account and tugboat set up, as well as seedbox-setup.sh present in the current directory.
@aphexddb
aphexddb / .wakeup
Last active May 14, 2023 05:10
OSX sleepwatcher script to take a photo on wakeup and upload to dropbox
#!/bin/bash
#
# Mac camera auto upload script
#
#####################################################
# Generate filename based on date stamp
FILE_SRC=/tmp/$(date +%m%d%y%H%M%S).jpg;
DROPBOX_FOLDER=macbook
DROPBOX_UPLOADER=/Users/<username>/Dropbox-Uploader/dropbox_uploader.sh
@ssmereka
ssmereka / plexDatabaseBackupScript.sh
Last active April 16, 2024 16:42
Plex Media Server database backup script.
#!/bin/bash
# Backup a Plex database.
# Author Scott Smereka
# Version 1.0
# Script Tested on:
# Ubuntu 12.04 on 2/2/2014 [ OK ]
# Plex Database Location. The trailing slash is
@ssmereka
ssmereka / plexDatabaseRestoreScript.sh
Created February 2, 2014 20:41
Plex Media Server database backup restore script.
#!/bin/bash
# Restore a Plex database.
# Author Scott Smereka
# Version 1.0
# Script Tested on:
# Ubuntu 12.04 on 2/2/2014 [ OK ]
# Plex Database Location. The trailing slash is
@hazcod
hazcod / tcopy.sh
Last active October 22, 2015 05:18
Small script to tar and send over SSH for large compressed files. Rsync is too slow.
#!/bin/sh
IN_DIR=/volume1/Media/Films
OUT_DIR=/mnt/media/movies
REMOTE=nindustries@149.210.164.73
if [ ! -z "$1" ]; then
IN_DIR="$1"
fi
if [ ! -z "$2" ]; then
@Makeshift
Makeshift / acdautoupload.sh
Last active June 28, 2016 15:37
Automatic upload of files in a particular folder to amazon clouddrive
#!/bin/bash
FOLDER="/home/plex/toupload"
inotifywait -m $FOLDER -e create -e moved_to |
while read path action file; do
echo "The file '$file' appeared in directory '$path' via '$action'"
acd_cli ul $FOLDER/"$file" /Media/Unsorted/
rm -rf $FOLDER/"$file"
done
@hazcod
hazcod / uploader.sh
Last active August 26, 2019 19:03
Uploader script to upload media to acd_cli via cron
#!/bin/bash
#set -e
#set -x
# where to log
log="/var/log/uploader.log"
# where to keep our PIDs
tmp="/tmp/uploader"
# where is the unencrypted encfs
#!/bin/bash
export ENCFS6_CONFIG="/home/media/data/.encfs.xml"
crypt_mount="/tmp/.media"
uncrypt_mount="/tmp/media"
uploadcrypt="/home/media/data/uploading"
upload="/home/media/data/uploadme"
user="media"
group="media"
@samatjain
samatjain / Encrypted-Amazon-Cloud-Drive.md
Last active May 18, 2017 18:50
Setting up a encrypted drive on Amazon Cloud Drive w/ EncFS and acd_cli

Environment

export ACD_LOCAL=$HOME/.cache/Amazon-Cloud-Drive

# To use this file later
export ENCFS6_CONFIG=$ACD_LOCAL/encfs6.xml

Setup

mkdir -p \