Export your public key:
keybase pgp export > keybase-public.key
Export your private key:
keybase pgp export --secret > keybase-private.key
| #!/bin/bash | |
| printf_stdin() { local stdin; read -d '' -u 0 stdin; printf "$@" "$stdin"; } | |
| exec {log_fd}> >(systemd-cat -t $(basename $0)) | |
| log_emerg() { echo "EMERG: $1"|tee /dev/stderr| printf_stdin '<0>%s\n' "$1" >&"$log_fd"; } | |
| log_alert() { echo "ALERT: $1"|tee /dev/stderr| printf_stdin '<1>%s\n' "$1" >&"$log_fd"; } | |
| log_crit() { echo "CRIT: $1" |tee /dev/stderr| printf_stdin '<2>%s\n' "$1" >&"$log_fd"; } | |
| log_err() { echo "ERROR: $1"|tee /dev/stderr| printf_stdin '<3>%s\n' "$1" >&"$log_fd"; } | |
| log_warn() { echo "WARN: $1" |tee /dev/stderr| printf_stdin '<4>%s\n' "$1" >&"$log_fd"; } |
Export your public key:
keybase pgp export > keybase-public.key
Export your private key:
keybase pgp export --secret > keybase-private.key
Probably one of the easiest things you'll ever do with gpg
Install Keybase: https://keybase.io/download and Ensure the keybase cli is in your PATH
First get the public key
keybase pgp export | gpg --import
Next get the private key
| #!/bin/sh | |
| #if [ $# -lt 1 ]; then | |
| # echo "Usage: $0 prefix [initial] [database/file] " >&2 | |
| # exit 1 | |
| #fi | |
| key="${1:-"eth"}" | |
| initial="${2:-0}" | |
| datfile="${3:-/run/indexerdb_$key}" |
| kubectl get job -n sre kibana-config -o json | jq 'del(.spec.selector)' | jq 'del(.spec.template.metadata.labels)' | kubectl replace --force -f - |
DST=/mnt
find /var/lib -type f -size +1G -exec ls -lh {} \; | tee $DST/bigfiles_var_lib_$(date "+%H%M").log
find /var/lib -type f -size +1G -exec ls -lh {} \; | awk '{ print $5 ": " $9 }' | sort -rh > $DST/bigfiles_var_lib_$(date "+%H%M").sorted.log
| # See more: https://gist.github.com/epcim/80d2dda18e2b3022e4ab07f161f59823 | |
| # hab clustered etcd | |
| ## compose | |
| cat <<EOF > docker-compose.yml | |
| version: '3' | |
| services: | |
| etcd1: |
| bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9000)" != "200" ]]; do sleep 5; done' | |
| # also check https://gist.github.com/rgl/c2ba64b7e2a5a04d1eb65983995dce76 |
| # example usage: to split yaml with multiple documents | |
| needle() { | |
| SUFFIX=${1##*.} | |
| NEEDLE=${2:----} | |
| csplit -b "%03d.$SUFFIX" -zsf $(basename $1 .$SUFFIX) $1 /$NEEDLE/+1 {*} | |
| } | |
| needle vega-objects.yaml |