Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
# coding:utf-8
import sys
import os
try:
import gevent
import gevent.queue
import gevent.monkey
@phith0n
phith0n / sqlmap_api.dockerfile
Created November 5, 2016 20:38
Docker提高生产力之SQLMAP API
FROM python:2.7
ENV VERSION 1.0.11
RUN apt-get update && apt-get install -y \
git --no-install-recommends
RUN mkdir /app
WORKDIR /app
@madeye
madeye / sysctl.conf
Last active June 5, 2018 11:05
Optimized sysctl.conf for shadowsocks
net.core.wmem_max = 12582912
net.core.rmem_max = 12582912
net.ipv4.tcp_rmem = 10240 87380 12582912
net.ipv4.tcp_wmem = 10240 87380 12582912
net.ipv4.ip_local_port_range = 18000 65535
net.ipv4.netfilter.ip_conntrack_tcp_timeout_time_wait = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_max_syn_backlog = 3240000
net.core.somaxconn = 3240000
net.ipv4.tcp_max_tw_buckets = 1440000
@debuggerx01
debuggerx01 / FileServer.py
Last active January 7, 2020 09:03
基于修改过的python3的http.server的脚本再次修改而来支持文件上传下载及双向剪切板操作的python3脚本,支持pc(需要pyperclip库)及安卓(需要termux:api)
#!/usr/bin/env python3
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
see: https://gist.github.com/UniIsland/3346170
"""
@idealhack
idealhack / ingress-passcode.js
Last active November 13, 2020 07:20 — forked from DragorWW/ingress-passcode.js
ingress passcode auto run
// disable iitc plugin if it's on
// go to https://www.ingress.com/intel
// open console and paste in the code below, press enter
// join https://t.me/passcodes for more passcodes
// add jquery
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
(function() {
function escapeQuote(str) {
return str.replace("\"", "\\\"");
}
function buildAria2Url(name, url) {
return `aria2c -c -s10 -k1M -x16 --enable-rpc=false ` +
`-o "${escapeQuote(name)}" ` +
`--header "${escapeQuote(window.navigator.userAgent)}" ` +
`--header "Referer: ${escapeQuote(window.location.toString())}" ` +
@zh-h
zh-h / who-weibo.js
Last active February 27, 2021 19:00
是谁发的微博微博图片
function decodeBase62(number) {
var alphabet = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
var out = 0
var len = number.length - 1
for (var t = 0; t <= len; t++) {
out = out + alphabet.indexOf(number.substr(t, 1)) * Math.pow(62, len - t)
}
return out
}
@myl7
myl7 / req.sh
Last active February 14, 2022 06:51
Zero-dependency HTTP request script from https://www.v2ex.com/t/811424
#!/bin/bash
set -euo pipefail
# From https://www.v2ex.com/t/811424
function __curl() {
read proto server path <<<$(echo ${1//// })
DOC=/${path// //}
HOST=${server//:*}
PORT=${server//*:}
@wangyan
wangyan / vps_auto_backup.sh
Created December 21, 2011 12:27
vps automatic local and offsite backup shell cript
#! /bin/bash
#====================================================================
# vps_auto_backup.sh
#
# Copyright (c) 2011, WangYan <webmaster@wangyan.org>
# All rights reserved.
# Distributed under the GNU General Public License, version 3.0.
#
# vps automatic local and offsite backup shell cript
#