Skip to content

Instantly share code, notes, and snippets.

cloverstd cloverstd

Block or report user

Report or block cloverstd

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
View taobao_sign.go
package sign
import (
"crypto/md5"
"encoding/hex"
"net/url"
"sort"
"strings"
)
View taobao_sign.go
package sign
import (
"crypto/md5"
"encoding/hex"
"net/url"
"sort"
"strings"
)
@cloverstd
cloverstd / json_test.go
Created Jul 16, 2018
benchmark with json
View json_test.go
package main_test
import (
"encoding/json"
"testing"
)
func BenchmarkJSONMarshalStruct(b *testing.B) {
type Foo struct {
Name string `json:"name"`
View tcp-chcker.py
#!/usr/bin/env python
# encoding: utf-8
import socket
import struct
import select
import errno
import time
# https://github.com/tevino/tcp-shaker
@cloverstd
cloverstd / byte_to_ascii.go
Created Dec 27, 2017
convert []byte to ascii
View byte_to_ascii.go
package main
import (
"fmt"
"strconv"
)
func main() {
// a := map[string]interface{}{
// "中文": map[string]interface{}{
@cloverstd
cloverstd / qiniu.go
Last active Jul 21, 2017
Docker registry V2 qiniu storage,镜像仓库七牛驱动,https://hui.lu/docker-registry-storage/
View qiniu.go
package qiniu
import (
"bytes"
"context"
"encoding/base64"
"encoding/json"
"fmt"
"io"
"io/ioutil"
@cloverstd
cloverstd / Dockerfile
Created May 20, 2017
Minos Dockerfile
View Dockerfile
FROM python:2
RUN echo "deb http://mirrors.aliyun.com/debian/ jessie main non-free contrib" > /etc/apt/sources.list && \
echo "deb http://mirrors.aliyun.com/debian/ jessie-proposed-updates main non-free contrib" >> /etc/apt/sources.list && \
echo "deb-src http://mirrors.aliyun.com/debian/ jessie main non-free contrib" >> /etc/apt/sources.list && \
echo "deb-src http://mirrors.aliyun.com/debian/ jessie-proposed-updates main non-free contrib" >> /etc/apt/sources.list && \
apt-get update && apt-get install libcurl4-openssl-dev -y && \
apt-get install git -y && \
cd / && \
git clone https://github.com/phith0n/Minos.git /code && \
@cloverstd
cloverstd / workerpool.go
Created Mar 16, 2017
Workerpool with golang channel
View workerpool.go
package main
import (
"container/list"
"fmt"
"log"
"net/http"
"strconv"
"sync"
"time"
@cloverstd
cloverstd / main.py
Created Oct 22, 2016
Handle file upload by Tornado and Nginx Upload Module
View main.py
#!/usr/bin/env python
# encoding: utf-8
import tornado.ioloop
import tornado.web
import tornado.log
import tornado.httpserver
from tornado.options import define, options
import logging
import tornado.gen
@cloverstd
cloverstd / sshpass.rb
Last active Oct 11, 2016 — forked from lalyos/sshpass.rb
brew install sshpass
View sshpass.rb
require 'formula'
class Sshpass < Formula
url 'http://sourceforge.net/projects/sshpass/files/sshpass/1.06/sshpass-1.06.tar.gz'
homepage 'http://sourceforge.net/projects/sshpass'
sh256 'c6324fcee608b99a58f9870157dfa754837f8c48be3df0f5e2f3accf145dee60'
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
You can’t perform that action at this time.