Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
# encoding: utf-8
"""
@author: xl7dev
"""
from aiohttp import ClientSession
import asyncio
import optparse
from pymongo import MongoClient
@xl7dev
xl7dev / install-parallel-centos-6.sh
Created October 17, 2017 12:18
Install GNU parallel on CentOS 6
#!/bin/bash
# Install GNU parallel on CentOS 6.
# http://software.opensuse.org//download.html?project=home%3Atange&package=parallel
cd /etc/yum.repos.d/
wget http://download.opensuse.org/repositories/home:tange/CentOS_CentOS-6/home:tange.repo
yum install parallel
# Alternative:
@xl7dev
xl7dev / request_c.py
Last active October 16, 2018 11:17
python request文件下载续传
#!/usr/bin/env python
# encoding: utf-8
"""
@author: xl7dev
"""
import sys
import os
import cgi
import re
@xl7dev
xl7dev / DnsHelper.py
Created February 6, 2018 10:49
AsyncResolver for python3.5+
#!/usr/bin/env python
# encoding: utf-8
"""
@author: xl7dev
@time: 2018/2/6 上午11:40
for Python3.5+
"""
import random
import string
#!/usr/bin/env python
# encoding: utf-8
import sys
import execjs
def runjs(password):
js = execjs.compile("""
var k = RSAUtils = {}
#!/usr/bin/env python
# Copyright (C) 2013 mindmac <mindmac.hu@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
#!/usr/bin/env python
# Copyright (C) 2013 thuxnder <patrick@bluebox.com>
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software