Skip to content

Instantly share code, notes, and snippets.

View guanix's full-sized avatar

Guan Yang guanix

  • 44FE 23DB 362F 611C 0CC3 116B D49B 113D 48DC 370E
  • New York
View GitHub Profile
#!/usr/bin/env ruby
require "socket"
require "openssl"
require "thread"
listeningPort = 443
server = TCPServer.new(listeningPort)
sslContext = OpenSSL::SSL::SSLContext.new
#!/bin/sh
prev=0
limit=100
for this in `cat $1`; do
if [ $prev -eq 0 ]; then
prev=$this
continue
fi
#!/bin/sh
# FACTCHECK: Double-check you got your stuff right.
# This is the filename of the new hotlist for users you need to re-download.
# Run it in the script directory, it'll go down and smash the furniture properly.
echo "" > missing-hotlist.txt
cd videos
for each in *
#!/bin/sh
#
# GRAPEFRUIT: Given a user, downloads all that user's videos.
#
USER=$1
PAGE=$2
PYTHON=`which python`
if [ ! -d videos ]
#!/bin/sh
#
# GRAPEFRUIT: Given a user, downloads all that user's videos.
# THIS IS THE AXEL version. BEWARE IT WILL EAT ALL OF YOUR BANDWITH LIKE COOKIE MONSTER, BUT BETTER
USER=$1
PAGE=$2
#Path to axel
AXEL="$(which aria2c)"
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Ricardo Garcia Gonzalez
# Author: Danny Colligan
# Author: Benjamin Johnson
# Author: Vasyl' Vavrychuk
# Author: Witold Baryluk
# Author: Paweł Paprota
# Author: Guan Yang
# Author: David Triendl
#!/bin/sh
# FACTCHECK: Double-check you got your stuff right.
# This is the filename of the new hotlist for users you need to re-download.
# Run it in the script directory, it'll go down and smash the furniture properly.
echo "" > missing-hotlist.txt
cd videos
for each in *
#!/bin/sh
#
# GRAPEFRUIT: Given a user, downloads all that user's videos.
#
USER=$1
PAGE=$2
if [ ! -d videos ]
then
#!/bin/sh
# FACTCHECK: Double-check you got your stuff right.
# This is the filename of the new hotlist for users you need to re-download.
# Run it in the script directory, it'll go down and smash the furniture properly.
echo "" > missing-hotlist.txt
cd videos
for each in *
--- ../yahoo/youtube-dl 2011-02-10 22:10:41.000000000 +0000
+++ youtube-dl 2011-02-21 01:51:54.000000000 +0000
@@ -535,7 +535,7 @@
template_dict = dict(info_dict)
template_dict['epoch'] = unicode(long(time.time()))
template_dict['autonumber'] = unicode('%05d' % self._num_downloads)
- filename = self.params['outtmpl'] % template_dict
+ filename = (self.params['outtmpl'] % template_dict).replace("/", "_")
return filename
except (ValueError, KeyError), err: