This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name XXXX; | |
location / { | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_pass https://spreadsheets.google.com; | |
proxy_set_header x-real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding=utf-8 | |
import re | |
from scrapy import log | |
from scrapy.http import Request, FormRequest | |
from scrapy.spider import BaseSpider | |
from scrapy.contrib.spiders import CrawlSpider, Rule | |
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor | |
from scrapy.selector import HtmlXPathSelector | |
def print_red(s):print '\033[0;31;48m%s\033[0m'%s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding=utf-8 | |
import BaseHTTPServer, SocketServer, urllib, urllib2, urlparse, zlib, socket, os, sys, errno, base64, re, time, datetime | |
HopHeaders = ['connection', 'keep-alive', 'proxy-authenticate', 'proxy-authorization', 'te', 'trailers', 'transfer-encoding', 'upgrade'] | |
def print_red(s): | |
print '\033[0;31;48m%s\033[0m'%s | |
class ProxyHandler(BaseHTTPServer.BaseHTTPRequestHandler): | |
def do_GET(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding=utf-8 | |
import sys, json | |
users = {} | |
uid = 0 | |
fn = open(sys.argv[1]) | |
while True: | |
line = fn.readline() | |
if not line:break | |
data = line.split() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"time" | |
"math/rand" | |
"runtime" | |
) | |
func get_rand_int(max int) int { | |
rand.Seed( time.Now().UTC().UnixNano()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ackage main | |
import ( | |
"fmt" | |
"time" | |
"math/rand" | |
) | |
func get_rand_int(max int) int { | |
rand.Seed( time.Now().UTC().UnixNano()) | |
return rand.Intn(max) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import( | |
"fmt" | |
"github.com/vmihailenco/redis" | |
) | |
func main(){ | |
password := "" | |
db := int64(-1) | |
client := redis.NewTCPClient("localhost:6379", password, db) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def c(t): | |
return time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(t)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding=utf-8 | |
import sys, os, subprocess | |
dir_ = sys.argv[1] | |
command = 'mencoder -oac mp3lame -ovc lavc -lavcopts vcodec=mpeg4 -sub "%s" -subfont-text-scale 1.8 -subpos 95 -sub-bg-alpha 240 -utf8 -o "%s" "%s"' | |
for fn in os.listdir(dir_): | |
name, ext = os.path.splitext(fn) | |
mp4_file = os.path.join(dir_, fn) | |
srt_file = os.path.join(dir_, '%s.srt'%name) | |
if ext == '.mp4' and os.path.exists(srt_file): | |
print fn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#auth_param basic program /usr/lib/squid3/ncsa_auth /home/jay/jayproxy/auth-password | |
#auth_param basic children 5 | |
#auth_param basic realm PLEASE LOGIN IN | |
#auth_param basic credentialsttl 4 hours | |
#auth_param basic casesensitive off | |
#authenticate_ip_ttl 5 minutes | |
#acl nosingleip max_user_ip -s 1 | |
#acl ncsa_users proxy_auth REQUIRED | |
#http_access deny nosingleip |
OlderNewer