This file contains hidden or 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
''' | |
A python script which starts celery worker and auto reload it when any code change happens. | |
I did this because Celery worker's "--autoreload" option seems not working for a lot of people. | |
''' | |
import time | |
from watchdog.observers import Observer ##pip install watchdog | |
from watchdog.events import PatternMatchingEventHandler | |
import psutil ##pip install psutil | |
import os |
This file contains hidden or 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
import asyncio | |
import hiredis | |
d = {} | |
def process(req): | |
cmd = req[0].lower() | |
if cmd==b'set': | |
d[req[1]] = req[2] | |
return b"+OK\r\n" |
This file contains hidden or 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
wget https://github.com/ginuerzh/gost/releases/download/v2.3/gost_2.3_linux_amd64.tar.gz | |
tar -zxvf gost_2.3_linux_amd64.tar.gz | |
server: | |
gost -L=socks://:9023 | |
local: | |
gost -L=ss://aes-128-cfb:123456@:8446 |
This file contains hidden or 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
import gevent | |
import logging | |
import requests | |
try: | |
import simplejson as json | |
except: | |
import json | |
from gevent.pool import Group, Pool |
This file contains hidden or 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
.flex { | |
display: flex; | |
flex-direction: row; | |
flex-wrap: wrap; | |
// flex-flow: row wrap; | |
justify-content: flex-start; // (center | flex-end) 左, 居中, 右 元素排版 | |
justify-coutent: space-bettween; | |
This file contains hidden or 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
fronted google_80 | |
mode tcp | |
bind 104.224.187.225:80 | |
default_backend google_80 | |
backend google_80 | |
balance roundrobin | |
server google_80_01 172.217.4.164:80 check | |
server google_80_02 172.217.5.69:80:80 check | |
fronted google_443 |
This file contains hidden or 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
Address = 0.0.0.0 | |
Port = 659 | |
Compression = 5 | |
Subnet = 10.200.0.0/24 | |
Subnet = 192.168.56.0/24 |
This file contains hidden or 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
### 入门 | |
https://www.youtube.com/playlist?list=PLWlUJU11tp4fEXI8deWhBQAHDv9R23WHB | |
### 插件 | |
Dynamic Button |
This file contains hidden or 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
""" | |
Tiny | |
A reversible base62 ID obfuscater | |
Authors: | |
Jacob DeHart (original PHP version) and Kyle Bragger (Ruby port) | |
and Lee Semel (python port) | |
Usage: | |
obfuscated_id = to_tiny(123) | |
original_id = from_tiny(obfuscated_id) | |
Configuration: |