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
# -*- coding: utf-8 -*- | |
# 14-8-20 | |
# create by: snower | |
import os | |
import time | |
import struct | |
import fcntl | |
from logging.handlers import RotatingFileHandler, TimedRotatingFileHandler |
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
package com.aecg.cdtx.controller; | |
import io.github.snower.jaslock.Event; | |
import io.github.snower.jaslock.SlockClient; | |
import io.github.snower.jaslock.exceptions.SlockException; | |
import org.bson.types.ObjectId; | |
import org.springframework.web.bind.annotation.*; | |
import org.springframework.web.context.request.async.DeferredResult; | |
import java.io.IOException; |
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
# -*- coding: utf-8 -*- | |
# 2023/2/7 | |
# create by: snower | |
import sevent | |
PORT = 80 | |
SSH_ADDRES = ("127.0.0.1", 2222) | |
HTTP_ADDRES = ("127.0.0.1", 8080) | |
HTTPS_ADDRES = ("127.0.0.1", 4443) |
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
package main | |
import ( | |
"bytes" | |
"encoding/binary" | |
"fmt" | |
"math/rand" | |
"time" | |
) |
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
# -*- coding: utf-8 -*- | |
# 2020/7/10 | |
# create by: snower | |
from sevent.helpers.tcp2proxy import * | |
def check_host(forward_host, allow_hosts): | |
for host in allow_hosts: | |
if forward_host == host or forward_host.endswith(host): | |
return True |
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
init_worker_by_lua_block { | |
local slock = require "slock" | |
slock:connect("server1", "127.0.0.1", 5658) | |
} | |
server { | |
listen 8081; | |
default_type application/json; | |
location /poll/event { |
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
# -*- coding: utf-8 -*- | |
# 2021/8/19 | |
# create by: snower | |
import argparse | |
import logging | |
import sevent | |
from sevent.helpers import tcp2proxy | |
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
# -*- coding: utf-8 -*- | |
#14-6-6 | |
# create by: snower | |
import struct | |
from collections import defaultdict | |
import socket | |
default_networds = ( |
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
# -*- coding: utf-8 -*- | |
# 2020/7/8 | |
# create by: snower | |
import sys | |
import time | |
import struct | |
import socket | |
import logging | |
import traceback |
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
# -*- coding: utf-8 -*- | |
# 2020/3/4 | |
# create by: snower | |
import sys | |
import time | |
import logging | |
import struct | |
import socket | |
import traceback |
NewerOlder