日志收集、查询、分析:logstash,kibana,elasticsearch
分布式测试框架:locust
CI: jenkins
import fcntl | |
import time | |
import sys | |
lock = file('singleapp.lock', "w+") | |
try: | |
fcntl.lockf(lock, fcntl.LOCK_EX|fcntl.LOCK_NB) | |
except Exception, e: | |
print "kill me before start again" |
import ( | |
"bytes" | |
"crypto/tls" | |
"crypto/x509" | |
"io/ioutil" | |
"net/http" | |
) | |
wechatCertPath = "/path/to/wechat/cert.pem" | |
wechatKeyPath = "/path/to/wechat/key.pem" |
package forms | |
import "github.com/gorilla/schema" | |
import "github.com/go-validator/validator" | |
var decoder = schema.NewDecoder() | |
func Validate( | |
dst interface{}, | |
values map[string][]string) (bool, map[string][]error) { |
/* | |
由于float精度的问题。在现实世界中遇到下面的问题。 | |
``` | |
f := 4.02 | |
i := int(f * 100.0) | |
fmt.Println("i = ", i) | |
``` | |
> i = 401 | |
*/ |
redis 命令参数数量不能超过 1024*1024 个,包含命令哦。 比如:
SADD key 1 2 3 4...n (n <= 1024*1024 - 2)
#!/usr/bin/env python | |
#-*- coding:utf-8 -*- | |
# created: Mon Sep 15 13:27:15 2014 | |
# filename: mkpasswd.py | |
# author: juntao liu | |
# email: [email protected] | |
# descritpion: | |
import datetime | |
import random |