go mod edit -replace github.com/repo=github.com/repo@commit-hash
go mod tidy
go mod vendor
<html>
<head>
<link rel="icon" href="favicon.png" type="image/png" id="favicon" />
</head>
<script>
var badge = 0;
var icon = document.getElementById("favicon");
var original = new Image(32, 32);
shuf -er -n128 {A..Z} {a..z} {0..9}|tr -d '\n'
shuf -er -n20 {0..9}|sha512sum|cut -c 1-128
shuf -er -n20 {A..Z} {a-z} {0..9}|sha512sum|cut -c 1-128
openssl rand -base64 128|tr -d '\n'
find ./ -type f -name "*.ts" -exec bash -c "echo -e \"// $(date -u)\" >> {}" \;
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
# Generate a private key | |
# Note: RSA can only encrypt messages that have fewer bits than the key. | |
openssl genrsa -des3 -out ./private4096.pem 4096 | |
# Export public key | |
openssl rsa -in ./private4096.pem -outform PEM -pubout -out ./public4096.pem | |
# Encrypt | |
openssl rsautl -encrypt -inkey ./public4096.pem -pubin -out ./ciphertext.$(date +'%Y-%m-%d_%H-%M-%S') -in ./plaintext.file |
git fetch --tags -f
git tag|grep -B 1 vX.Y.Z|head -n 1
By default, SSH sessions are dropped after a small period of time (broken pipe) on macOS.
This setting in /etc/ssh/ssh_config
prevents this:
Host *
ServerAliveInterval 60
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
SOURCE="$POD:/tmp/dump.sql" | |
TARGET="./dump.compressed.sql" | |
kubectl exec -n $NS --stdin --tty $POD -c $CONTAINER -- pg_dump -f /tmp/dump.sql -F c -Z 9 -U $DBUSER $DBNAME | |
kubectl cp -n $NS -c $CONTAINER "$SOURCE" "$TARGET" |
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
SOURCE="$POD:/path/to/a/file" | |
TARGET="./file" | |
kubectl cp -n $NS -c $CONTAINER "$SOURCE" "$TARGET" |
NewerOlder