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
graph LR | |
A[Internet] -- A-series ==> Rack47 | |
Rack47 -- ToNode ==> g0a0a0a | |
g0a0a0a --FromNode ==> Rack47 | |
Rack47 -- ToNode ==> g0b0b0b | |
g0b0b0b --> P[(pod)] | |
g0b0b0b --> P[(pod2)] |
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
langs := []string{"english", "russian", "french", "german", "spanish", "japanese", "chinese", "italian", "korean"} | |
for _, v := range langs { | |
if err := CreateJS(v, jsDirectory); err != nil { | |
panic(err) | |
} | |
} | |
// CreateJS accepts the JS file name to be created, and a slice of translations to | |
// create a dedicated JS file for each language. | |
func CreateJS(name, directory string) error { |
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 ( | |
"encoding/csv" | |
"fmt" | |
"github.com/aws/aws-sdk-go/aws" | |
"github.com/aws/aws-sdk-go/aws/credentials" | |
"github.com/aws/aws-sdk-go/aws/session" | |
"github.com/aws/aws-sdk-go/service/translate" | |
"io" |
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
// TranslateCSV accepts a CSV file for translations, the CSV format should be: | |
// key,english_value | |
// hey,Hello | |
// bye,Goodbye | |
// the CSV KEY will be used as the JS variable name | |
func TranslateCSV(filename string) error { | |
file, _ := os.Open(filename) | |
defer file.Close() | |
c := csv.NewReader(file) |
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
// InitAWS sets up the AWS Translate package using your AWS credientials | |
// via environment variables: AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY | |
func InitAWS() { | |
awsKey = os.Getenv("AWS_ACCESS_KEY_ID") | |
awsSecret = os.Getenv("AWS_SECRET_ACCESS_KEY") | |
creds := credentials.NewStaticCredentials(awsKey, awsSecret, "") | |
sess, err := session.NewSession(&aws.Config{ | |
Region: aws.String("us-west-2"), | |
Credentials: creds, |
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
// +build ignore | |
package main | |
import ( | |
"encoding/csv" | |
"fmt" | |
"github.com/aws/aws-sdk-go/aws" | |
"github.com/aws/aws-sdk-go/aws/credentials" | |
"github.com/aws/aws-sdk-go/aws/session" |
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: Pod | |
metadata: | |
name: envar-demo | |
labels: | |
purpose: demonstrate-envars | |
spec: | |
containers: | |
- name: envar-demo-container | |
image: gcr.io/google-samples/node-hello:1.0 |
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: Pod | |
metadata: | |
name: envar-demo | |
labels: | |
purpose: demonstrate-envars | |
spec: | |
containers: | |
- name: envar-demo-container | |
image: gcr.io/google-samples/node-hello:1.0 |
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
[ | |
{ | |
"type": 1, | |
"title": "Statping", | |
"restart_policy": "unless-stopped", | |
"description": "Service monitoring with an easy to use status page and mobile app", | |
"logo": "https://assets.statping.com/icon.png", | |
"image": "statping/statping:latest", | |
"ports": [ | |
"8080:8080/tcp" |
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
# Deploy Portainer demo (demo.portainer.io) in a play-with-docker playground | |
# | |
# - Go to http://play-with-docker.com/?stack=https://raw.githubusercontent.com/portainer/portainer-demo/master/play-with-docker/docker-stack.yml | |
# - Login and/or Start. | |
# - Wait until 'Your session is ready!' and 'Close' modal. | |
# - Refresh (if a shell is not shown). | |
# - Wait until a link with text '80' is shown. It is the link to the demo. | |
# - Visit https://github.com/portainer/portainer to check default credentials. | |
# | |
version: '3' |
NewerOlder