- 2010年8月 腾讯宣布收购康盛创想 Discuz
- 2011年1月:拿下同程网30%股权;
- 2011年5月17日:收购艺龙旅行网近16%的股权;
- 2011年2月28日:与Groupon和云锋基金共同组建“高朋网”;
- 2011年5月6日:耗资4.45亿收购华谊兄弟4.6%股份;
- 2011年5月30日:向网上鞋城好乐买投资5000万美元;
- 2011年6月21日:向珂兰钻石网投资数千万美元;
- 2011年7月6日:与金山软件联合宣布双方达成战略投资合作;
- 据DNSPod投资方绿盟科技披露,曾经在2009年导致六省断网导的DNSPod,已经于2011年8月转让给腾讯关联公司深圳世纪凯旋公司,转让价格为4000万元。
- 2011年10月13日:与开心网宣布加强双方在社交平台业务上的合作;
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
#install openssl | |
#sudo aptitude install python-openssl | |
from OpenSSL import SSL | |
import socket, SocketServer | |
class SSlSocketServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer): | |
def __init__(self, server_address, RequestHandlerClass, bind_and_activate=True): | |
SocketServer.BaseServer.__init__(self, server_address, |
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
#partial config | |
server { | |
listen 80; | |
server_name -; | |
location / { | |
include uwsgi_params; | |
uwsgi_pass 127.0.0.1:9090; | |
uwsgi_param UWSGI_PYHOME /home/user/webpy_project_dir/env; | |
uwsgi_param UWSGI_SCRIPT wsgi; | |
uwsgi_param UWSGI_CHDIR /home/user/webpy_project_dir/; |
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 walkutil(input_folder,folder_cbk=None,file_cbk=None): | |
def walk(str1):#nestd function to walk dir | |
import os,os.path | |
str1 = os.path.abspath(str1)#get absolute path | |
for file in [file for file in os.listdir(str1) if not file in [".",".."]]: | |
nfile = os.path.join(str1,file)#combine path | |
if os.path.isdir(nfile):#is folder | |
if folder_cbk is not None: | |
folder_cbk(nfile) | |
walk(nfile)#iter |
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
import mimetypes | |
from email.MIMEMultipart import MIMEMultipart | |
from email.Header import Header | |
from email.MIMEText import MIMEText | |
from email.MIMEImage import MIMEImage | |
from time import sleep | |
import smtplib | |
def sendEmail(htmlText): |
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
#install gcc git build-essential python3 | |
$ sudo aptitude install gcc git build-essential python3 | |
#from http://www.pip-installer.org/en/latest/installing.html | |
$ curl -O https://raw.github.com/pypa/virtualenv/master/virtualenv.py | |
$ mkdir python3_prole | |
$ cd python3_prole/ | |
$ python virtualenv.py -p /usr/bin/python3 env | |
$ python virtualenv.py --relocatable -p /usr/bin/python3 env |
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
export PATH=$PATH:/home/zdb/go/bin | |
export GOROOT=/home/zdb/go | |
export GOOS=linux | |
export GOARCH=amd64 |
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
import socket | |
remote = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
remote.connect(('127.0.0.1',8080)) | |
remote.send('123\n\n') | |
print remote.recv(4096) | |
remote.close() |
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
#!/usr/bin/env python | |
import json | |
import os | |
from tornado.escape import utf8 | |
from tornado.ioloop import IOLoop | |
from tornado.options import define, options, parse_command_line, parse_config_file | |
from tornado.web import RequestHandler, Application, asynchronous, authenticated, HTTPError |