This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"flag" | |
"fmt" | |
"os" | |
"path/filepath" | |
"time" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func split(buf []byte, lim int) [][]byte { | |
var chunk []byte | |
chunks := make([][]byte, 0, len(buf)/lim+1) | |
for len(buf) >= lim { | |
chunk, buf = buf[:lim], buf[lim:] | |
chunks = append(chunks, chunk) | |
} | |
if len(buf) > 0 { | |
chunks = append(chunks, buf[:len(buf)]) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks GUys use this oone | |
----- BEGIN LICENSE ----- | |
Member J2TeaM | |
Single User License | |
EA7E-1011316 | |
D7DA350E 1B8B0760 972F8B60 F3E64036 | |
B9B4E234 F356F38F 0AD1E3B7 0E9C5FAD | |
FA0A2ABE 25F65BD8 D51458E5 3923CE80 | |
87428428 79079A01 AA69F319 A1AF29A4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Sublime Text 3 Serial key build is 3176 | |
> * Added these lines into /etc/hosts | |
127.0.0.1 www.sublimetext.com | |
127.0.0.1 license.sublimehq.com | |
> * Used the license key | |
----- BEGIN LICENSE ----- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type ConditionFunc func() (bool, error) | |
// Retry retries f every interval until after maxRetries. | |
// The interval won't be affected by how long f takes. | |
// For example, if interval is 3s, f takes 1s, another f will be called 2s later. | |
// However, if f takes longer than interval, it will be delayed. | |
func Retry(interval time.Duration, maxRetries int, f ConditionFunc) error { | |
if maxRetries <= 0 { | |
return fmt.Errorf("maxRetries (%d) should be > 0", maxRetries) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: coredns | |
namespace: kube-system | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRole | |
metadata: | |
labels: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: tiller | |
namespace: kube-system | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
kind: ClusterRoleBinding | |
metadata: | |
name: tiller |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
感谢分享! 貌似azure也提供了镜像。 | |
stable http://mirror.azure.cn/kubernetes/charts/ | |
incubator http://mirror.azure.cn/kubernetes/charts-incubator/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You need the following packages installed. | |
btrfs-progs-devel-3.16.2-1.el7.x86_64 | |
btrfs-progs-3.16.2-1.el7.x86_64 | |
In the absence of that you can do a make docker-build | |
I also checked in conditional compilation for btrfs if you don't have the packages installed. So if you get the latest, you should be able to build without the btrfs packages. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"net/http" | |
"time" | |
"github.com/prometheus/client_golang/prometheus/promhttp" | |
) |
NewerOlder