Skip to content

Instantly share code, notes, and snippets.

@andriyudatama
andriyudatama / VS Code Disable GPU Acceleration
Last active November 14, 2025 22:50
Disable Hardware Acceleration (GPU) on Visual Studio Code
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
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: [email protected]
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"
@nymous
nymous / README.md
Last active November 14, 2025 12:05
Logging setup for FastAPI, Uvicorn and Structlog (with Datadog integration)

Logging setup for FastAPI

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

@loperd
loperd / argocd-ingress-grpc.yaml
Created March 25, 2023 22:21
Setup Argocd in the mode Cloudflare (Full strict) -> Haproxy -> Argocd (insecure)
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: