Skip to content

Instantly share code, notes, and snippets.

@CyprienRicque
CyprienRicque / nvidia-smi-ehc
Last active August 20, 2024 07:23
Enhanced nvidia-smi with username and command line of the processes
#!/bin/bash
nvidia-smi > /tmp/c-nvidia-smi.out
header_end=$(nvidia-smi | grep -n "Processes:" | cut -d: -f1)
cat /tmp/c-nvidia-smi.out | head -n $((header_end))
echo "| GPU PID Command GPU Memory User |"
echo "| Usage |"
echo "|=============================================================================|"
@CyprienRicque
CyprienRicque / Http on server to local proxy.md
Last active August 12, 2024 13:33
Forwards http requests from server to local proxy

Setup

Local

mkdir proxy
cd proxy
# Copy the proxy.js file

npm install http net http-proxy readline-sync ucipass-logger --save
@CyprienRicque
CyprienRicque / wireproxy-http.md
Last active August 5, 2024 21:01
Wireproxy with http

Wireguard config

Setup wireguard config file (to use in file http_config.conf in the next step) Make sure it has the following in [Peer] section

PersistentKeepalive = 25

Wireproxy