This file contains 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" | |
"golang.org/x/sync/errgroup" | |
"strconv" | |
"time" | |
) | |
func main() { |
This file contains 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 ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"sort" | |
) | |
type Data struct { |
This file contains 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
// go test -bench Benchmark -benchmem | |
// | |
// goos: linux | |
// goarch: amd64 | |
// pkg: RbacInvestigation | |
// cpu: Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz | |
// BenchmarkKeyMatchUrl-4 84588968 12.81 ns/op 0 B/op 0 allocs/op | |
// BenchmarkRegexMatchUrl-4 193255 5285 ns/op 2321 B/op 22 allocs/op | |
// BenchmarkRegexMatchOption-4 177576 6507 ns/op 3949 B/op 27 allocs/op | |
// BenchmarkOptionMatchOption-4 7389206 206.0 ns/op 48 B/op 1 allocs/op |
This file contains 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" | |
"math" | |
"time" | |
) | |
type Progress struct { | |
current float64 |
This file contains 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
# It expects that you have github client. If not just remove ther "gh pr .." line. | |
# It expects bash. Not sure how it will work on other shells. | |
# It expects the current folder to be same as the calc worker repo name e.g. "qmt-poland-motor-link4" | |
# If merge fails you need to solve them manually. | |
BRANCH="feature/updates-merge-from-template" && \ | |
git checkout master; git fetch --all && \ | |
git pull && \ | |
git fetch template && \ |
This file contains 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: PersistentVolume | |
metadata: | |
name: pv-var-log-pods | |
labels: | |
type: local | |
spec: | |
storageClassName: local-path | |
accessModes: | |
- ReadOnlyMany |
This file contains 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
<?php | |
/** | |
* Case A | |
*/ | |
$a_start = new DateTime('2016-04-01', new DateTimeZone('Europe/Tallinn')); // Results in 2016-04-01 00:00:00.000000 | |
$a_end = (new DateTime('2016-06-30', new DateTimeZone('Europe/Tallinn')))->add( new DateInterval('P1D') ); // Results in 2016-07-01 00:00:00.000000 |