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
| #!/usr/bin/bash | |
| function retry() { | |
| tries=0 | |
| max_tries=3 | |
| sleep_sec=1 | |
| exit_code=256 | |
| error='' | |
| until { error=$(${@} 2>&1 1>&${stdout}); } {stdout}>&1; do |
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
| ~/gocode/drone-trigger/src/github.com/vaijab/drone-trigger> time ./drone-trigger --help | |
| NAME: | |
| drone-trigger - trigger drone builds or deployments | |
| USAGE: | |
| drone-trigger [global options] command [command options] [arguments...] | |
| VERSION: | |
| 0.0.1 | |
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 Foo struct { | |
| Name string | |
| Number interface{} // Optional field | |
| } | |
| // SQL | |
| CREATE TABLE foo ( | |
| name VARCHAR(255), | |
| number INTEGER // Sometimes it is actually NULL | |
| ) |
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
| m.Clusters.On("GetClusters", cluster.Name).Return([]*model.Cluster{}, nil).Once() | |
| m.Clusters.On("CreateClusterInfra", cluster).Return(nil) | |
| m.Clusters.On("PushAssets", cluster.Name, model.Assets{}).Return(nil) | |
| // At this point the cluster already exists. | |
| m.Clusters.On("GetClusters", cluster.Name).Return([]*model.Cluster{&cluster}, nil).Once() |
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: extensions/v1beta1 | |
| kind: Deployment | |
| metadata: | |
| name: drone-agent-github | |
| spec: | |
| replicas: 5 | |
| template: | |
| 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
| export PROTOC_VERSION=3.5.1 | |
| wget -q https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip -O /tmp/protoc-${PROTOC_VERSION}.zip && unzip -d /usr /tmp/protoc-${PROTOC_VERSION}.zip |
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
| # Samples: 4K of event 'cycles:ppp' | |
| # Event count (approx.): 127052685112 | |
| # | |
| # Children Self Command Shared Object Symbol | |
| # ........ ........ ............... ......................................... ....................................................................................................... | |
| # | |
| 25.49% 0.00% swapper [kernel.kallsyms] [k] secondary_startup_64 | |
| | | |
| ---secondary_startup_64 | |
| | |
OlderNewer