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
| GOCMD=go | |
| GOTEST=$(GOCMD) test | |
| GOVET=$(GOCMD) vet | |
| BINARY_NAME=example | |
| VERSION?=0.0.0 | |
| SERVICE_PORT?=3000 | |
| DOCKER_REGISTRY?= #if set it should finished by / | |
| EXPORT_RESULT?=false # for CI please set EXPORT_RESULT to true | |
| GREEN := $(shell tput -Txterm setaf 2) |
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
| # Example of using an init container chown the data in a pvc as a pod starts. Useful for migrating | |
| # which user and group your containers run as. | |
| # Works by having an init container mount your data, chmod it before it's consumed by your main container. | |
| --- | |
| apiVersion: apps/v1 | |
| kind: StatefulSet | |
| metadata: | |
| name: mysql-statefull | |
| spec: |
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
| /* | |
| A client for openexchangerates.org's API | |
| This package is a small client for openexchangerates.org's HTTP API. It | |
| respects the HTTP etags returned by the service, and implements most of | |
| the available methods at the moment. | |
| */ | |
| package openexchangerates | |
| import ( |
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 retry(attempts int, sleep time.Duration, fn func() error) error { | |
| if err := fn(); err != nil { | |
| if s, ok := err.(stop); ok { | |
| // Return the original error for later checking | |
| return s.error | |
| } | |
| if attempts--; attempts > 0 { | |
| time.Sleep(sleep) | |
| return retry(attempts, 2*sleep, fn) |
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
| ASG name = frigga.group = app-stack-detail(-options)-push | |
| frigga.cluster = app-stack-detail | |
| frigga.push = v<sequence) | |
| options: | |
| - c0<value> = countries | |
| - d0<value = devPhase | |
| - h0<value> = hardware |
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
| # The initial version | |
| if [ ! -f .env ] | |
| then | |
| export $(cat .env | xargs) | |
| fi | |
| # My favorite from the comments. Thanks @richarddewit & others! | |
| set -a && source .env && set +a |
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
| import ratpack.exec.ExecController; | |
| import ratpack.exec.Execution; | |
| import ratpack.http.client.HttpClient; | |
| import ratpack.server.RatpackServer; | |
| import ratpack.service.Service; | |
| import ratpack.service.StartEvent; | |
| import ratpack.service.StopEvent; | |
| import java.net.URI; | |
| import java.util.Optional; |
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 ( | |
| "bytes" | |
| "encoding/json" | |
| "fmt" | |
| "strconv" | |
| ) | |
| func main() { |
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
| @Grab(group='com.github.groovy-wslite', module='groovy-wslite', version='1.1.0') | |
| @Grab(group='joda-time', module='joda-time', version='2.7') | |
| import wslite.rest.* | |
| import org.joda.time.* | |
| import org.joda.time.format.* | |
| import groovy.xml.* | |
| import groovy.json.* | |
| import static java.lang.System.* | |
| import groovy.transform.* |
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" | |
| "os" | |
| "os/signal" | |
| "syscall" | |
| ) | |
| func main() { |
NewerOlder