All New

user:thomas gists created by user

title:mygist gists with given title

description:sync gists with given description

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

all:systemctl search all fields

Register

Login

All New Register Login

All gists

Recently created
Least recently created
Recently updated
Least recently updated

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 5 months ago
1 root@wireguard:/etc/wireguard# wgctl watch
2
3 ────────────────────────────────────────────────
4 wgctl — Live Monitor (Ctrl+C to stop)
5 ────────────────────────────────────────────────
6
7 TIME SOURCE CLIENT DESTINATION/ENDPOINT EVENT STATUS
8 ─────────────────────────────────────────────────────────────────────────────────────────────────────────
9
10 16/05/2026 20:02 wg phone-luis 176.223.61.15 handshake allowed

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 5 months ago
1 #!/usr/bin/env bash
2
3 UI_ROW_WIDTH=${UI_ROW_WIDTH:-20}
4 UI_SECTION_WIDTH=${UI_SECTION_WIDTH:-44}
5
6 function ui::row() {
7 local label="$1" value="$2" width="${3:-$UI_ROW_WIDTH}"
8 printf " %-${width}s %s\n" "${label}:" "$value"
9 }

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 5 months ago
1 #!/usr/bin/env bash
2
3 # ============================================
4 # Date Formats
5 # ============================================
6
7 FMT_DATE_ISO="%Y-%m-%d" # 2026-05-10
8 FMT_DATE_EU="%d/%m/%Y" # 10/05/2026
9 FMT_DATE_EU_DASH="%d-%m-%Y" # 10-05-2026
10 FMT_DATETIME_ISO="%Y-%m-%d %H:%M" # 2026-05-10 22:39

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 5 months ago
1 #!/usr/bin/env bash
2 # policy.command.sh — manage policies
3 #
4 # Subcommands:
5 # wgctl policy list
6 # wgctl policy show --name <name>
7 # wgctl policy add --name <name> [--tunnel-mode split|full]
8 # [--default-rule <rule>] [--strict-rule] [--no-auto-apply]
9 # [--desc <desc>]
10 # wgctl policy rm --name <name>

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 5 months ago
1 #!/usr/bin/env bash
2 # subnet.command.sh — manage the subnet map (subnets.json)
3 #
4 # Subcommands:
5 # wgctl subnet list
6 # wgctl subnet show --name <name>
7 # wgctl subnet add --name <name> --subnet <cidr> [--type <type>]
8 # [--tunnel-mode split|full] [--desc <desc>]
9 # [--group <parent>]
10 # wgctl subnet rm --name <name>

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 5 months ago
1 #!/usr/bin/env bash
2 # ui/identity.module.sh — rendering for identity data
3 # All functions pure rendering — no writes, no state changes.
4
5 function ui::identity::header() {
6 printf " %-20s %-7s %s\n" "IDENTITY" "PEERS" "DEVICE TYPES"
7 ui::divider 54
8 }
9
10 function ui::identity::row() {

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 5 months ago
1 #!/usr/bin/env bash
2 # identity.module.sh — identity file management and peer-name inference
3
4 # ===========================================================================
5 # Path helpers
6 # ===========================================================================
7
8 function identity::path() {
9 local name="${1:-}"
10 echo "$(ctx::identities)/${name}.identity"

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 5 months ago
1 #!/usr/bin/env bash
2
3 # ============================================
4 # Client Config
5 # ============================================
6
7 function peers::create_client_config() {
8 local name="$1"
9 local type="$2"
10 local ip="$3"

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 5 months ago
1 function cmd::identity::_device_status() {
2 local peer_name="${1:-}"
3 local peer_ip
4 peer_ip=$(peers::get_ip "$peer_name" 2>/dev/null) || return 0
5 [[ -z "$peer_ip" ]] && return 0
6
7 local is_blocked is_restricted pubkey handshake_ts
8 is_blocked=$(peers::is_blocked "$peer_name")
9 is_restricted=$(peers::is_restricted "$peer_name")
10 pubkey=$(cat "$(ctx::clients)/${peer_name}.pub" 2>/dev/null) || pubkey=""

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 5 months ago
1 function cmd::identity::_show() {
2 local name=""
3 while [[ $# -gt 0 ]]; do
4 case "$1" in
5 --name) name="$2"; shift 2 ;;
6 --help) cmd::identity::help; return ;;
7 *) log::error "Unknown flag: $1"; return 1 ;;
8 esac
9 done
Newer Older

Powered by Opengist ⋅ Load: 96ms⋅

English
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文
⋅ KrilHub