Skip to content

Instantly share code, notes, and snippets.

View sedlund's full-sized avatar

Scott Edlund sedlund

  • Distributed
  • 14:09 (UTC +07:00)
View GitHub Profile
@howardjohn
howardjohn / otel-trace.sh
Created July 11, 2023 14:44
Example of three different ways to use otel tracing in bash. See https://blog.howardjohn.info/posts/shell-tracing/
#!/bin/bash
# Usage: tracing::init [endpoint; default localhost:4317]
function tracing::init() {
export OTEL_EXPORTER_OTLP_ENDPOINT="${1:-${OTEL_EXPORTER_OTLP_ENDPOINT:-localhost:4317}}"
}
# Usage: tracing::auto::init [endpoint; default localhost:4317]
function tracing::auto::init() {
tracing::init
@oskar456
oskar456 / wgcf.py
Last active December 20, 2024 23:13
Cloudflare WARP linux client (using wg-quick for actual tunnel setup)
#!/usr/bin/env python3
import subprocess
import json
import os
from pathlib import Path
import requests
from requests.compat import urljoin