- Export key to file:
gpg -o key.gpg --export <KEY ID>
- Export key in ASCII:
gpg -o key.asc --export --armor <KEY ID>
Note: Omitting the -o|--output option will print the key to stdout.
gpg --import key.gpg
Light Theme | |
#F9F4EE,#EEE8D5,#486570,#F9F4EE,#E8E1D8,#486570,#2AA198,#DC322F,#486570,#F9F4EE | |
Dark Theme | |
#292C33,#EEE8D5,#CFC2AE,#292C33,#6F7073,#CFC2AE,#5D8687,#5D8687,#CFC2AE,#292C33 |
-- Copied from https://www.alexedwards.net/blog/using-postgresql-jsonb | |
-- Create a table with a JSONB column. | |
CREATE TABLE items ( | |
id SERIAL PRIMARY KEY, | |
attrs JSONB | |
); | |
-- You can insert any well-formed json input into the column. Note that only | |
-- lowercase `true` and `false` spellings are accepted. |
# fluxctl cheatsheet | |
## Use different namespace than default for flux daemon. | |
export FLUX_FORWARD_NAMESPACE={kube_ns} | |
fluxctl --k8s-fwd-ns={kube_ns} list-workloads | |
## List all workloads | |
fluxctl list-workloads | |
## List all workloads in all namespaces |
# Local port forwarding | |
# Forward all the requests on localhost:8000 to restricted-domain.com:80 via remote-server.com | |
ssh -L 8000:restricted-domain.com:80 user@remote-server.com | |
# Remote port forwarding | |
# Forward all requests to remote-server.com:8000 to your localhost:3000 | |
ssh -R 8000:localhost:3000 user@remote-server.com |
gpg -o key.gpg --export <KEY ID>
gpg -o key.asc --export --armor <KEY ID>
Note: Omitting the -o|--output option will print the key to stdout.
gpg --import key.gpg
$\{var:-word}
: If var is null or unset, word is substituted for var. The value of var does not change.
$\{var:=word}
: If var is null or unset, var is set to the value of word.
$\{var:?message}
: If var is null or unset, message is printed to standard error. This checks that variables are set correctly.
$\{var:+word}
: If var is set, word is substituted for var. The value of var does not change.
package main | |
import ( | |
"runtime" | |
"fmt" | |
"time" | |
) | |
func main() { | |
// Print our starting memory usage (should be around 0mb) |
/* | |
*********************************************** | |
psql -h host -U user db: Connect to database | |
psql -E: Describe the underlaying queries of the \ commands | |
psql -l: List all database and exit | |
\q: Quit | |
\c db_name: Switch database | |
\l: Show databases | |
\d table_name: Show table info |
curl -ks registry/v2/_catalog | jq '.["repositories"] | join(" ")' | tr -d '"' | |
curl -ks registry/v2/go/tags/list | jq . | |
curl -ks registry/v2/_catalog | jq . |
let regex; | |
/* matching a specific string */ | |
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello" | |
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO" | |
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes... | |
/* wildcards */ | |
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo" | |
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo" |