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
| FROM golang:1.12.4-alpine3.9 as builder | |
| RUN mkdir /user && \ | |
| echo 'nobody:x:65534:65534:nobody:/:' > /user/passwd && \ | |
| echo 'nobody:x:65534:' > /user/group | |
| RUN apk add --no-cache ca-certificates git | |
| WORKDIR /src |
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
| # Use postgres/example user/password credentials | |
| version: '3.1' | |
| services: | |
| db: | |
| image: postgres | |
| restart: always | |
| environment: | |
| POSTGRES_PASSWORD: toor |
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 | |
| // This is a basic example of running an nsqd instance embedded. It creates | |
| // and runs an nsqd with all of the default options, and then produces | |
| // and consumes a single message. You are probably better off running a | |
| // standalone instance, but embedding it can simplify deployment and is | |
| // useful in testing. | |
| // See https://github.com/nsqio/nsq/blob/master/nsqd/options.go and | |
| // https://github.com/nsqio/nsq/blob/master/apps/nsqd/nsqd.go for |
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
| version: "3" | |
| services: | |
| scylla-node1: | |
| build: ./scylla | |
| restart: always | |
| networks: | |
| web: | |
| environment: |
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
| -- postgres@11e07910117d:/$ pg_dump trx -t accounts -U trx | |
| -- | |
| -- PostgreSQL database dump | |
| -- | |
| -- Dumped from database version 10.5 (Debian 10.5-1.pgdg90+1) | |
| -- Dumped by pg_dump version 10.5 (Debian 10.5-1.pgdg90+1) | |
| SET statement_timeout = 0; | |
| SET lock_timeout = 0; |
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
| regis | |
| ----- | |
| ``` | |
| $ openssl pkcs12 -nokeys -in regis-ctr.pfx -out regis-ctr.pem | |
| $ openssl pkcs12 -nocerts -nodes -in regis-ctr.pfx -out regis-ctr.key | |
| ``` |
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
| server { | |
| listen 80; | |
| server_name konga.colaboratory.co.za; | |
| sendfile on; | |
| location / { | |
| proxy_buffer_size 64k; | |
| proxy_buffers 16 32k; |
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: my-nginx | |
| spec: | |
| selector: | |
| matchLabels: | |
| run: my-nginx | |
| replicas: 2 | |
| template: |
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" | |
| func main() { | |
| channel := make(chan int) | |
| done := make(chan bool) | |
| start := 0 | |
| go playerOne(channel, done) |
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 Query(conns []Conn, query string) Result { | |
| ch := make(chan Result) | |
| for _, conn := range conns { | |
| go func(c Conn) { | |
| select { | |
| case ch <- c.DoQuery(query): | |
| default: | |
| } | |
| }(conn) | |
| } |