Skip to content

Instantly share code, notes, and snippets.

@lintianzhi
lintianzhi / itbl.go
Last active August 29, 2015 14:01
itbl
//http://play.golang.org/p/nRZP1YHQaB
package main
import "fmt"
import "strconv"
func main() {
fmt.Println("Hello, playground")
itbl := 435746972
@lintianzhi
lintianzhi / MPChannel_api.md
Last active August 29, 2015 14:03
MPChannel_api
POST /givememp
Content-Type: application/json

{"id": "my_id", "phone": 2345, "longtitude": "123.1123", "latitude", "323.231"}

200 OK
Content-Type: application/json

{"results": [...]}
@lintianzhi
lintianzhi / noreq
Last active August 29, 2015 14:04
no X-* header
10012 ~/tmp » curl -v -o /dev/null http://mxycforum.u.qiniudn.com/2014-07-22-af9ef033c73595ca9b260326fa19c6b6\?imageMogr/v2/auto-orient/thumbnail/750/c
* Adding handle: conn: 0x7fe101004600
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7fe101004600) send_pipe: 1, recv_pipe: 0
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* About to connect() to mxycforum.u.qiniudn.com port 80 (#0)
* Trying 180.153.176.136...
@lintianzhi
lintianzhi / xx
Created July 23, 2014 02:33
no image log
10073 ~/tmp » curl -v -o /dev/null -H "Host: mxycforum.u.qiniudn.com" http://iovip.qbox.me/2014-07-22-af9ef033c73595ca9b260326fa19c6b6\?imageMogr/v2/auto-orient/thumbnail/750/ccffff
* Adding handle: conn: 0x7fe142804600
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7fe142804600) send_pipe: 1, recv_pipe: 0
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* About to connect() to iovip.qbox.me port 80 (#0)
* Trying 183.136.139.17...
@lintianzhi
lintianzhi / encrypt.go
Created August 15, 2014 02:43
gpg encript
package main
import (
// "bytes"
"code.google.com/p/go.crypto/openpgp"
"github.com/qiniu/log"
"io/ioutil"
"os"
)
@lintianzhi
lintianzhi / decrypt.go
Created August 15, 2014 02:44
gpg decrypt
package main
import (
"code.google.com/p/go.crypto/openpgp"
"github.com/qiniu/log"
"io/ioutil"
"os"
)
func main() {
@lintianzhi
lintianzhi / reqid_time.go
Created September 1, 2014 07:14
parse request id
package main
// run: go run % 3jgAAPjhC9FXslMT ZnkAANzksCImuUcT
// build: go build -o /usr/bin/qiniu-reqid %
import (
"os"
"time"
"fmt"
"log"

#Sewise 接口

数据流

  1. Qiniu向Sewise发送一个转码请求,返回得到一个taskid,输入文件的url包含在请求中
  2. Sewise在转码完成后用这个taskid往Qiniu回调(回调的url包含在第一步的请求里),表示结果

Qiniu -> Sewise

Getting Started with Ufop on Qiniu

====

旧版本文档,不要参考这个,看这里

1. Introduction

这个教程的目的是快速上手部署和使用一个 Ufop 的应用。

@lintianzhi
lintianzhi / buildpack-des.md
Created December 5, 2014 17:04
buildpack description

heruku buildpack

heroku有一个buildpack的概念,可以使用它的buildpack来搭建任何用户需要的环境。(其实buildpack是CloudFoundry的)

buildpack是用来解决运行一个程序运行时的安装依赖问题,他的规则是这样的。

会有三个目录BUILD, CACHE,ENVBUILD是要搭建环境的目标目录,CACHE是为了节约时间可以重复利用的缓存目录,ENV是运行是需要用到的环境变量目录

会有一个tar包,里面的目录结构是: