clean up unused images that is older than 30 days:
0 0 * * 0 /usr/bin/docker image prune -a --force --filter "until=$(date -d "30 days ago" +%Y-%m-%d)T00:00:00"
|
clean up unused images that is older than 30 days:
0 0 * * 0 /usr/bin/docker image prune -a --force --filter "until=$(date -d "30 days ago" +%Y-%m-%d)T00:00:00"
Kafka 0.11.0.0 (Confluent 3.3.0) added support to manipulate offsets for a consumer group via cli kafka-consumer-groups
command.
kafka-consumer-groups --bootstrap-server <kafkahost:port> --group <group_id> --describe
Note the values under "CURRENT-OFFSET" and "LOG-END-OFFSET". "CURRENT-OFFSET" is the offset where this consumer group is currently at in each of the partitions.
rm -rf output && mkdir output | |
bin/./scalapbc \ | |
--proto_path=/path/your/proto \ | |
--proto_path=/path/to/googleapis-master/ \ # download from https://github.com/googleapis/googleapis | |
--proto_path=/path/to/protobuf-master/src/ \ # download from https://github.com/protocolbuffers/protobuf | |
--scala_out=output rpc.proto | |
# do this once for server private key: | |
openssl ecparam -genkey -name prime256v1 -out tls.key | |
# both server and all clients have to use the same cert file tls.cert | |
openssl req -new -sha256 \ | |
-key tls.key \ | |
-subj "/CN=localhost/O=lnd" \ | |
-reqexts SAN \ | |
-config <(cat /etc/ssl/openssl.cnf \ | |
<(printf "\n[SAN]\nsubjectAltName=DNS:localhost,DNS:aaaa,DNS:bbbb,IP:192.168.1.xxx")) \ |
PWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
list CAs | |
keytool -list -keystore $(/usr/libexec/java_home)/jre/lib/security/cacerts | |
Add new CA | |
sudo keytool -keystore $(/usr/libexec/java_home)/jre/lib/security/cacerts -importcert -alias new_cert -file cer_file.cer/pem | |
default pass: changeit |
sudo -u postgres psql postgres | |
CREATE USER testuser WITH PASSWORD '123123'; | |
CREATE DATABASE testdb; | |
GRANT ALL PRIVILEGES ON DATABASE testdb to testuser; |