Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:
sysctl -a | grep machdep.cpu.features | grep VMX
If there's output, you're good!
This logging setup configures Structlog to output pretty logs in development, and JSON log lines in production.
Then, you can use Structlog loggers or standard logging loggers, and they both will be processed by the Structlog pipeline (see the hello() endpoint for reference). That way any log generated by your dependencies will also be processed and enriched, even if they know nothing about Structlog!
Requests are assigned a correlation ID with the asgi-correlation-id middleware (either captured from incoming request or generated on the fly).
All logs are linked to the correlation ID, and to the Datadog trace/span if instrumented.
This data "global to the request" is stored in context vars, and automatically added to all logs produced during the request thanks to Structlog.
You can add to these "global local variables" at any point in an endpoint with `structlog.contextvars.bind_contextvars(custom
| Visual Studio Code frequently crashes linux. Using NVIDIA GPU | |
| 1. Open command pallete (Ctrl + Shift + P) | |
| 2. Enter "Preferences: Configure Runtime Arguments" | |
| 3. Add config: "disable-hardware-acceleration": true | |
| 4. Restart VS Code |
| public class Backtrack { | |
| public static List<List<Object>> backtrack(int[] A) { | |
| // Set up a list of list to hold all possible solutions | |
| List<List<Object>> result = new LinkedList<List<Object>>(); | |
| if (A == null || A.length == 0) { | |
| return result; | |
| } | |
| // As we need to recursively generate every solution, | |
| // a variable is needed to store single solution. |
| #!/bin/sh | |
| # Cleanup docker files: untagged containers and images. | |
| # | |
| # Use `docker-cleanup -n` for a dry run to see what would be deleted. | |
| untagged_containers() { | |
| # Print containers using untagged images: $1 is used with awk's print: 0=line, 1=column 1. | |
| # NOTE: "[0-9a-f]{12}" does not work with GNU Awk 3.1.7 (RHEL6). | |
| # Ref: https://github.com/blueyed/dotfiles/commit/a14f0b4b#commitcomment-6736470 | |
| docker ps -a | tail -n +2 | awk '$2 ~ "^[0-9a-f]+$" {print $'$1'}' |
My typical setup for a development box in VirtualBox uses two NICs. The first uses NAT to allow the box to communicate with the outside world through my host computer’s network connection. (NAT is the default, so shouldn't require any setup.) The second is a "host-only" connection that allows my host and guest to interact.
To create a host-only connection in VirtualBox, start by opening the preferences in VirtualBox. Go to the "Network" tab, and addd a Host-only Network. Modify the host-only network, and disable DHCP. Make a note of the IP address. (Feel free to set the IP address as well, if you like.)
Next, assign this host-only adapter to the virtual machine. Select the VM and press "Settings". Go to the "Network" tab, and select "Adpater 2". Enable the adapter, set it to a "Host-only Adapter", and select the adpater you created above.
| apiVersion: networking.k8s.io/v1 | |
| kind: Ingress | |
| metadata: | |
| name: argocd-server-ingress-grpc | |
| namespace: argocd | |
| annotations: | |
| kubernetes.io/ingress.class: haproxy | |
| haproxy.org/backend-protocol: "grpc" | |
| haproxy.org/ssl-certificate: "argocd/<yourdomain-tls-secret-name>" | |
| spec: |
| From self[at]sungpae.com Mon Nov 8 16:59:48 2021 | |
| Date: Mon, 8 Nov 2021 16:59:48 -0600 | |
| From: Sung Pae <self[at]sungpae.com> | |
| To: security@docker.com | |
| Subject: Permissive forwarding rule leads to unintentional exposure of | |
| containers to external hosts | |
| Message-ID: <YYmr4l1isfH9VQCn@SHANGRILA> | |
| MIME-Version: 1.0 | |
| Content-Type: multipart/signed; micalg=pgp-sha256; | |
| protocol="application/pgp-signature"; boundary="QR1yLfEBO/zgxYVA" |