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 | |
# coding:utf-8 | |
import sys | |
import os | |
try: | |
import gevent | |
import gevent.queue | |
import gevent.monkey |
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
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 |
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
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 |
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 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 | |
""" |
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
// 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); |
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
(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())}" ` + |
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
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 | |
} |
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
#!/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//*:} |
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
#! /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 | |
# |
OlderNewer