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 ( | |
"context" | |
"fmt" | |
"os" | |
"github.com/jackc/pgtype" | |
"github.com/jackc/pgx" | |
) |
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
// A small SSH daemon providing bash sessions | |
// | |
// Server: | |
// cd my/new/dir/ | |
// #generate server keypair | |
// ssh-keygen -t rsa | |
// go get -v . | |
// go run sshd.go | |
// | |
// Client: |
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
server { | |
listen 80; | |
listen [::]:80; | |
root /opt/cds/dist; | |
index index.html; | |
location /assets/worker/cdsapi/events { | |
gzip_static off; | |
} |
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 ( | |
"context" | |
"errors" | |
"fmt" | |
"os" | |
"time" | |
"github.com/cenkalti/backoff" |
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
$ openssl x509 -in .keys/crdb/ca.crt -noout -text | |
Certificate: | |
Data: | |
Version: 3 (0x2) | |
Serial Number: | |
d0:69:a6:a0:b6:b8:9e:b5:cf:62:98:2e:b7:7d:9e:15 | |
Signature Algorithm: sha256WithRSAEncryption | |
Issuer: O=Cockroach, CN=Cockroach CA | |
Validity | |
Not Before: Jul 24 18:54:32 2018 GMT |
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
openssl genrsa -out ca.key 4096 | |
openssl req -new -x509 -days 365 -key ca.key -out ca.crt -subj "/C=US/ST=Washington/L=Seattle/O=Test/OU=Test/CN=localhost:8888" | |
openssl genrsa -out server.key 4096 | |
openssl req -new -sha256 -key server.key -out server.csr -subj "/C=US/ST=Washington/L=Seattle/O=Test/OU=Server/CN=stackable.dev" -reqexts SAN -config <(cat /etc/ssl/openssl.cnf <(printf "[SAN]\nsubjectAltName=DNS:localhost,DNS:127.0.0.1,DNS:*.stackable.dev,DNS:stackable.dev")) | |
# openssl req -new -sha256 -key server.key -out server.csr -subj "/C=US/ST=Washington/L=Seattle/O=Test/OU=Server/CN=localhost:8888" | |
openssl x509 -req -days 365 -in server.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out server.crt | |
openssl rsa -in server.key -out server.key | |
openssl genrsa -out client.key 4096 |
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
root@ctl-1:~# nomad status | |
ID Type Priority Status Submit Date | |
vm1_0a4621ec-d40c-d8cc-0b5d-582d009ce725 service 50 pending 2018-05-07T19:17:33Z | |
root@ctl-1:~# nomad status | |
ID Type Priority Status Submit Date | |
vm1_0a4621ec-d40c-d8cc-0b5d-582d009ce725 service 50 pending 2018-05-07T19:17:33Z | |
root@ctl-1:~# nomad status vm1_0a4621ec-d40c-d8cc-0b5d-582d009ce725 | |
ID = vm1_0a4621ec-d40c-d8cc-0b5d-582d009ce725 | |
Name = vm1_0a4621ec-d40c-d8cc-0b5d-582d009ce725 | |
Submit Date = 2018-05-07T19:17:33Z |
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
provider "triton" { | |
insecure_skip_tls_verify = true | |
} | |
data "triton_network" "public" { | |
name = "Joyent-SDC-Public" | |
} | |
data "triton_image" "lts" { | |
name = "base-64-lts" |
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
### Keybase proof | |
I hereby claim: | |
* I am cheaproc on github. | |
* I am justinwr (https://keybase.io/justinwr) on keybase. | |
* I have a public key ASCBgOUBdHRlOfPDdem4t-uIpX8uV1JRhY1w1URz02q95Qo | |
To claim this, I am signing this object: |
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
provider "triton" { | |
insecure_skip_tls_verify = true | |
} | |
data "triton_network" "public" { | |
name = "Joyent-SDC-Public" | |
} | |
data "triton_image" "lts" { | |
name = "base-64-lts" |
NewerOlder