Skip to content

Instantly share code, notes, and snippets.

View zxc111's full-sized avatar
💭
I may be slow to respond.

zxc111

💭
I may be slow to respond.
View GitHub Profile
@zxc111
zxc111 / 常用命令
Last active April 29, 2018 09:00
常用命令
sudo usermod -aG docker $USER // docker without sudo
./configure --with-features=huge \
--enable-multibyte \
--enable-rubyinterp=yes \
--enable-python3interp=yes \
--with-python3-config-dir=$(python3-config --configdir) \ //注意修改地址和版本,ubuntu可能在
--enable-perlinterp=yes \
--enable-luainterp=yes \
--enable-gui=gtk2 \
nghttpx -k -L INFO "--frontend=0.0.0.0,9000;no-tls" "--backend=80.85.85.190,3000;;tls;proto=h2" --http2-proxy --backend-http2-window-size=2097152 2>&1
# coding: utf8
import urllib2
import json
import urllib
url = "https://passport.weibo.com/visitor/genvisitor"
headers = """Connection: keep-alive
Cache-Control: max-age=0
Origin: https://passport.weibo.com
# coding: utf8
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy import Column, Integer, String, Sequence, SmallInteger
Base = declarative_base()
engine = create_engine(
@zxc111
zxc111 / log
Created January 18, 2015 07:45
# coding=utf-8
from tornado.options import options
from tornado.log import LogFormatter
import logging
from logging.handlers import RotatingFileHandler
import multiprocessing.queues
import threading
import sys
import traceback
@zxc111
zxc111 / s1_script
Created March 22, 2014 13:59
s1挂机脚本
# -*- encoding: utf8 -*-
import urllib2
import urllib
from cookielib import CookieJar
import pdb
import time
def check_process():
import subprocess
import sys
@zxc111
zxc111 / qq
Created September 5, 2013 02:53
#hexchar2bin函数
function hexchar2bin(str)
{var arr=[];
for(var i=0;i<str.length;i=i+2)
{arr.push("\\x"+str.substr(i,2))}
arr=arr.join("");
eval("var temp = '"+arr+"'");
return temp}
#uin2hex函数