Skip to content

Instantly share code, notes, and snippets.

viktorlindgren

Block or report user

Report or block viktorlindgren

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View svt-serier.sh
#!/bin/bash
cd "$(dirname "$0")" # Script path
mkdir -p SvtPlay && cd SvtPlay
WeekDay=$(date +'%A')
Hour=$(date +'%H')
function dl {
name=$1
if [[ "$WeekDay" != "$2" ]] || (( $3 != 10#$Hour )); then
@viktorlindgren
viktorlindgren / seafile-cli-update
Last active Dec 24, 2015
Seafile linux client update script
View seafile-cli-update
#!/bin/bash
# Create dirs if not exists
mkdir -p ~/bin ~/seaf-cli
cd ~/seaf-cli
# Remove any old or failed updates
rm -rf ~/seaf-cli/*.tar*
# Get download address
arch=$(uname -m | sed s/"_"/"-"/g)
@viktorlindgren
viktorlindgren / subscribe_youtube.py
Last active Dec 23, 2015
Subscript system of one Youtube channel using youtube-dl that only downloads newer videos since last time ran. youtube-dl can be found at http://rg3.github.io/youtube-dl/
View subscribe_youtube.py
from datetime import date, datetime
from subprocess import Popen, PIPE
import sys
DATEFORMAT = "%Y%m%d"
CONFPATH = 'last_updated.txt'
CMD = '''\
youtube-dl.exe -ci -w -o "%(title)s.%(ext)s" http://www.youtube.com/user/WTii1 --match-title "Warcraft 3.*"\
'''
You can’t perform that action at this time.