https://www.postgresql.org/docs/current/ssl-tcp.html
#!/bin/bash
mkdir ~/temp
message Double { | |
oneof value { | |
None none = 1; | |
double some = 2; | |
} | |
} | |
message Float { | |
oneof value { | |
None none = 1; | |
float some = 2; |
#!/bin/bash | |
set -e | |
sudo rm -f server.req privkey.pem server.key server.crt | |
# https://www.postgresql.org/docs/11/ssl-tcp.html | |
openssl req -new -text -passout pass:abcd -subj /CN=localhost -out server.req -keyout privkey.pem | |
openssl rsa -in privkey.pem -passin pass:abcd -out server.key | |
openssl req -x509 -in server.req -text -key server.key -out server.crt | |
chmod og-rwx server.key |
https://www.postgresql.org/docs/current/ssl-tcp.html
#!/bin/bash
mkdir ~/temp
the straght forward answer
[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}
https://www.cockroachlabs.com/docs/stable/start-a-local-cluster-in-docker-linux.html
sudo docker network create -d bridge roachnet
sudo docker run -d --name=roach1 --hostname=roach1 --net=roachnet -p 26257:26257 -p 8080:8080 -v "${PWD}/cockroach-data/roach1:/cockroach/cockroach-data" cockroachdb/cockroach:v19.2.2 start --insecure --join=roach1,roach2,roach3
sudo docker run -d --name=roach2 --hostname=roach2 --net=roachnet -v "${PWD}/cockroach-data/roach2:/cockroach/cockroach-data" cockroachdb/cockroach:v19.2.2 start --insecure --join=roach1,roach2,roach3
sudo docker run -d --name=roach3 --hostname=roach3 --net=roachnet -v "${PWD}/cockroach-data/roach3:/cockroach/cockroach-data" cockroachdb/cockroach:v19.2.2 start --insecure --join=roach1,roach2,roach3
# This is a scriptblock that will be invoked on the remote computer. This is | |
# just dummy code that gets the computers hostname from the global built in | |
# eniorment variable $env. | |
$RemoteTask = { | |
param( | |
[datetime]$Start | |
) | |
# pause remote script execition until the specified start time. | |
# you can use this to loosely sync jobs execution. |
//https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding | |
func writeOptimizedHttpResponse(w http.ResponseWriter, r *http.Request, b []byte, contentType string) { | |
w.Header().Set("Content-Type", contentType) | |
encodings := r.Header.Get("Accept-Encoding") | |
switch { | |
case strings.Contains(encodings, "gzip"): | |
w.Header().Set("Content-Encoding", "gzip") |
Table constraints can include multiple columns. The trick to getting this right is to join each column by their constraint ordinal positions. If you don't join correctly your script will blow up with duplicate rows 😥 whenever a table has multiple columns in a unique constraint.
This may be helpful in understanding what these tables do.
information_schema.table_constraints
package main | |
import ( | |
"database/sql" | |
"encoding/json" | |
"fmt" | |
"log" | |
_ "github.com/denisenkom/go-mssqldb" | |
) |
package main | |
import ( | |
"crypto/tls" | |
"crypto/x509" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" |