client.conf
用于限定机器的列表,并指定对应机房名称,支持目录glob匹配
permission.conf
用于权限控制
| <link rel="import" href="../polymer/polymer.html"> | |
| <polymer-element name="my-element"> | |
| <template> | |
| <style> | |
| :host { | |
| position: absolute; | |
| width: 100%; | |
| height: 100%; |
| public byte[] readFully(InputStream in) throws IOException { | |
| ByteArrayOutputStream out = new ByteArrayOutputStream(); | |
| byte[] buffer = new byte[1024]; //you can configure the buffer size | |
| while (true) { | |
| int r = in.read(buffer); | |
| if (r == -1) break; | |
| out.write(buffer, 0, r); | |
| } | |
| return out.toByteArray(); |
| #!/bin/bash | |
| host="http://docs.qiniu.com" | |
| IFS=$(echo -en "\n\b") | |
| code=0 | |
| for file in `find $1 -name *.html`; do | |
| for href in `egrep -o 'href="(.*?)".*?>(.*?)<' < $file | sed -E 's/href="([^\"]*)".*>(.*)</\1•\2/g'`; do | |
| name=${href##*•} | |
| href=${href%%•*} | |
| if [ ${href:0:1} == "#" ]; then | |
| path=$file$href |
| def make(progress): | |
| data = sorted([[v, k] for k, v in progress.iteritems()]) | |
| idx = 0 | |
| for i in range(len(data)-1, -1, -1): | |
| if i == 0: continue | |
| data[i][0] -= data[i-1][0] | |
| real_data = [] | |
| length = 0 | |
| for i in data: | |
| if length < 0: |
| package main | |
| // open http://localhost:8000 | |
| import ( | |
| "net/http" | |
| "io/ioutil" | |
| "regexp" | |
| ) | |
| var RePic = regexp.MustCompile(`"http://pic2.52pk.com/files[^"]+`) |
,Qiniu_Error.message、Qiniu_RS_StatRet.mimeType、Qiniu_RS_StatRet.hash 都声
| # -*- coding: utf-8 -*- | |
| import tpl | |
| if __name__ == "__main__": | |
| f = open("tpl.html", "r") | |
| t = tpl.Tpl(f.read()) | |
| f.close() | |
| print t.substitute(name="func", return=[dict(name="a"), dict(name="b")]) | |
| ''' result |