Skip to content

Instantly share code, notes, and snippets.

View mhsenpc's full-sized avatar

Mohsen Shamohammadi mhsenpc

View GitHub Profile
@cpt9m0
cpt9m0 / tcpdump_top_countries.sh
Last active January 26, 2026 13:21
TCPDump Top Countries Useful for Conduit
#!/usr/bin/env bash
set -euo pipefail
CAPTURE_SECONDS="${CAPTURE_SECONDS:-15}"
TOP_N="${TOP_N:-25}"
echo "=== Conduit Country Tracker (Top Countries) ==="
echo ""
echo "[1/4] Installing required tools..."
@kekru
kekru / Docker connect to remote server.md
Last active March 21, 2025 01:29
Connect to another host with your docker client, without modifying your local Docker installation

Run commands on remote Docker host

This is how to connect to another host with your docker client, without modifying your local Docker installation or when you don't have a local Docker installation.

Enable Docker Remote API

First be sure to enable the Docker Remote API on the remote host.

This can easily be done with a container.
For HTTP connection use jarkt/docker-remote-api.

#!/bin/bash
# this script is not written by me. Just using it and sharing it here.
# export DBUS_SESSION_BUS_ADDRESS environment variable useful when the script is set as a cron job
PID=$(pgrep gnome-session)
export DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ|cut -d= -f2-)
# $bing is needed to form the fully qualified URL for