Skip to content

Instantly share code, notes, and snippets.

rsj217 rsj217

Block or report user

Report or block rsj217

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
# coding=utf8
import base64
import io
import hashlib
from M2Crypto import RSA
rsj217 /
Last active Jan 16, 2019
python socket
#!/usr/bin/env python
# -*- coding:utf-8 -*-
Tornado source code write comments in `iostream._handle_events` which links is
# Most IOLoops will report a write failed connect
# with the WRITE event, but SelectIOLoop reports a
# READ as well so we must check for connecting before
# coding: utf-8
import asyncio
import requests
import tornado.gen as gen
import tornado.httpclient as httpclient
import tornado.httpserver as httpserver
import tornado.options as options
View go-poiter-new-make-nil.go
package main
import "fmt"
func main() {
// 声明一个变量 aVar 类型为 string
var aVar string
fmt.Printf("aVar: %p %#v\n", &aVar, aVar) // 输出 aVar: 0xc42000e240 ""
aVar = "This is a aVar"
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import socket
import sys
import threading
from itertools import chain
from queue import LifoQueue, Full, Empty
import os
View golang-gin-mysql-curd.go
package main
import (
async def main():
coroutine1 = do_some_work(1)
coroutine2 = do_some_work(2)
coroutine3 = do_some_work(4)
tasks = [
def extract_params(request):
if not isinstance(request, HTTPServerRequest):
request = request.request
parse_url = urlparse.urlparse(request.uri)
path, params, query, fragment = parse_url.path, parse_url.params, parse_url.query, parse_url.fragment
uri = urlparse.urlunparse((request.protocol,, path, params, query, fragment))
rsj217 /
Created May 6, 2014
a python class to use mysql. mysql 的连接关闭查询的python封装
# -*- coding: utf-8 -*-
__author__ = 'ghost'
import time, uuid, functools, threading, logging
def next_id(t=None):
if t is None:
View node-cluse-expressr-production-session.js
var cluster = require('cluster');
if (cluster.isMaster) {
/* var cpu_count = require('os').cpus().length;
require('os').cpus().forEach(function() {
var cpu_count = 2;
for (var i = 0; i < cpu_count; i++){
You can’t perform that action at this time.