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
| const fs = require("fs"); | |
| // | |
| // Utilities | |
| // | |
| const isArray = a => { | |
| return !!a && a.constructor === Array; | |
| }; |
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" | |
| "log" | |
| "net/http" | |
| "sync" | |
| "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
| package main | |
| import ( | |
| "io" | |
| "log" | |
| "os" | |
| "os/exec" | |
| "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
| package main | |
| import ( | |
| "net/url" | |
| "os" | |
| "time" | |
| "log" | |
| "github.com/cortexproject/cortex/pkg/util/flagext" |
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 ( | |
| "context" | |
| "fmt" | |
| "log" | |
| "time" | |
| "go.opencensus.io/stats" | |
| "go.opencensus.io/stats/view" |
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/env bash | |
| set -euo pipefail | |
| CLOUD_INIT_FINISH_FILE="/var/lib/cloud/instance/boot-finished" | |
| FILE_NAME=${FILE_NAME:-$CLOUD_INIT_FINISH_FILE} | |
| SLEEP_DELAY=${SLEEP_DELAY:-1} | |
| TIMEOUT_SECONDS=${TIMEOUT_SECONDS:-30} |
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
| # Set up dir of packages | |
| mkdir packages && cd packages | |
| pip download docker | |
| # Create a tar with all the packages | |
| tar -czf python-packages.tar.gz * | |
| # Upload to artifacts repository | |
| ./upload python-packages.tar.gz |
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 ( | |
| "context" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "tb/errgroup" | |
| "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
| package main | |
| import ( | |
| "context" | |
| "errors" | |
| "testing" | |
| ) | |
| func BenchmarkParamViaContext(b *testing.B) { | |
| p := &Person{ |
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
| SYSTEM_MODE(SEMI_AUTOMATIC); | |
| #include "scheduler.h"; | |
| #include "lgger.h"; | |
| #include "tmp36.h"; | |
| #include "udp_client.h"; | |
| #include "aggregator.h"; | |
| // Duration | |
| typedef unsigned int Duration; |