Skip to content

Instantly share code, notes, and snippets.

View lsjostro's full-sized avatar
:shipit:

Lars Sjöström lsjostro

:shipit:
View GitHub Profile
@etuttle
etuttle / docker-registry-caching-proxy.conf
Created February 14, 2017 23:54
NGINX config for a caching proxy that sits in front of a docker registry
upstream docker-mirror-upstream {
server upstream.example.com;
}
proxy_cache_path /var/lib/docker-mirror/cache levels=1:2 max_size=10g inactive=48h keys_zone=cache:10m;
server {
listen 80 default_server;
listen 443 ssl default_server;
@Lekensteyn
Lekensteyn / nvml-debugdump.c
Last active April 15, 2024 18:00
Make libnvidia-ml.so (nvidia-smi) write plaintext debug logs (mirror of https://lekensteyn.nl/files/nvml-debugdump.c)
/**
* Make libnvidia-ml.so (nvidia-smi) write plaintext debug logs.
*
* Usage:
*
* gcc -shared -fPIC -ldl nvml-debugdump.c -o nvml-debugdump.so
* LD_PRELOAD=./nvml-debugdump.so nvidia-smi --debug=debug.log -q
*
* For other NVML applications, set env var __NVML_DBG_FILE=debug.log
*