Skip to content

Instantly share code, notes, and snippets.

Zhang Hong reee

Block or report user

Report or block reee

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 gist:549079ffe0a8e379f1b8
# User authentication method. Could be set multiple times and in
# that case all should succeed. To enable multiple methods use
# multiple auth directives. Available options: certificate,
# plain, pam, radius, gssapi.
# Note that authentication methods cannot be changed with reload.
# certificate:
# This indicates that all connecting users must present a certificate.
reee /
Created Aug 27, 2015
for k in keywords_list:
google_add = random.choice(google_adds_list)
url = make_up_url(google_add, k, False)
if scrape_keyword_count(k, useragent_list, url, result_dir):
keyword_count = scrape_keyword_count(k, useragent_list, url, result_dir)
print '%s Finish. Removeing it from the list' % k
print "%s may run into problem, removing it from list" % google_add
reee / rateat
Last active Nov 26, 2017
Redirect All Traffic Except Asia Traffic
View rateat
#create a new chain named SHADOWSOCKS
iptables -t nat -N SHADOWSOCKS
# Ignore your shadowsocks server's addresses
# It's very IMPORTANT, just be careful.
iptables -t nat -A SHADOWSOCKS -d -j RETURN
iptables -t nat -A SHADOWSOCKS -d -j RETURN
reee / split-and-comp
Created Mar 24, 2014
Split a Doc into words and compare with a keywords list
View split-and-comp
#!/usr/bin/env python
# coding:utf-8
import os
import jieba
# Define where we put the files
source_dictionary = "/opt/ht/source"
keywords_file = "/opt/ht/keywords-new.txt"
result_file = "/opt/ht/result.txt"
You can’t perform that action at this time.