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: v1 | |
| kind: ConfigMap | |
| metadata: | |
| name: nginx-conf | |
| data: | |
| nginx.conf: | | |
| worker_processes 3; | |
| pid /tmp/nginx.pid; # Changed from /var/run/nginx.pid | |
| error_log /var/log/nginx/error.log; |
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: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: nginx-deployment | |
| labels: | |
| app: nginx | |
| spec: | |
| replicas: 3 | |
| selector: | |
| matchLabels: |
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: v1 | |
| kind: Service | |
| metadata: | |
| name: nginx-service | |
| spec: | |
| selector: | |
| app: nginx | |
| ports: | |
| - protocol: TCP | |
| port: 80 |
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: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: nginx-deployment | |
| labels: | |
| app: nginx | |
| spec: | |
| replicas: 3 | |
| selector: | |
| matchLabels: |
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
| # Accept the Go version for the image to be set as a build argument. | |
| # Default to Go 1.12 | |
| ARG GO_VERSION=1.12 | |
| FROM golang:${GO_VERSION} | |
| # Set the environment variables for the commands passed to the stage when using | |
| # `docker build --target code`. Leave CGO available for the race detector. | |
| # Set the working directory outside $GOPATH to enable the support for modules. |
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 ( | |
| "database/sql" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| // pq is postgres driver for database/sql | |
| _ "github.com/lib/pq" |
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" | |
| "database/sql" | |
| "fmt" | |
| "os/signal" | |
| "syscall" | |
| "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 email | |
| import ( | |
| "crypto/rsa" | |
| "time" | |
| jwt "github.com/dgrijalva/jwt-go" | |
| "github.com/pkg/errors" | |
| ) |
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
| var arr = [{"name":"John","age":10}, | |
| {"name":"Ron","age":11}, | |
| {"name":"Robin","age":12}, | |
| {"name":"Sean","age":45}, | |
| {"name":"Sarah","age":40} | |
| ]; | |
| function sort(array){ | |
| array.sort(function(a, b){ | |
| return a.age - b.age; | |
| }); |
NewerOlder