Skip to content

Instantly share code, notes, and snippets.

View hellt's full-sized avatar
🦍
grinding

Roman Dodin hellt

🦍
grinding
View GitHub Profile
@hellt
hellt / uvx.sh
Created March 4, 2026 13:33
uvx with git+https support
#!/bin/sh
set -eu
UV_INSTALL_DIR="${UV_INSTALL_DIR:-$HOME/.local/bin}"
if command -v uv >/dev/null 2>&1; then
UV_BIN="uv"
elif [ -x "$UV_INSTALL_DIR/uv" ]; then
UV_BIN="$UV_INSTALL_DIR/uv"
else
@hellt
hellt / nsp-curl.sh
Last active January 19, 2026 21:06
nsp-curl
while [ $# -gt 0 ]; do
case "$1" in
# IP address or the domain name of the NSP server (without http(s) schema)
--nsp_url=*)
NSP_URL="${1#*=}"
;;
# http proxy which will be used by curl if set
--proxy=*)
HTTP_PROXY="${1#*=}"
;;
@hellt
hellt / user.clab.yaml
Created January 14, 2026 16:09
user demo
name: srl
topology:
groups:
srl-new-user:
startup-config: |
set / system aaa authentication user student password student123 superuser true
nodes:
srl1:
kind: nokia_srlinux
image: ghcr.io/nokia/srlinux:25.10
/* Space out content a bit */
body {
padding-top: 20px;
padding-bottom: 20px;
}
/* Everything but the jumbotron gets side spacing for mobile first views */
.header,
.marketing,
.footer {
@hellt
hellt / vifmove.sh
Last active November 10, 2024 13:06
Virsh interface move
#!/bin/bash
# usage ~/vifmove.sh <virsh_domain_name/id> <interface_name> <new_bridge_name>
tmpxml=$(mktemp /tmp/ifcfg.XXX)
macaddr="$(virsh domiflist $1 | awk "/$2\s/ {print \$NF}")"
cat > "$tmpxml" <<EOF
<interface type='bridge'>
<mac address='$macaddr'/>
<source bridge='$3'/>
<model type='virtio'/>
</interface>
@hellt
hellt / nuage.md
Last active November 3, 2024 20:53
Nuage NPI

Nuage Networks NPI position @ Saint-Petersburg, Russia

Goal: To provide Nuage and NFV expertise for handling of Nuage product portfolio and Network Function Virtualization related Proof-of-Concepts, demo(s), Workshops and/or Post-Sales activities

Qualifications   Your main responsibilities will include:

  • (Technical) Pre-sales, Post-Sales, engineering and professional service support for the Nuage or NFV products in EMEA region. * Capture customer requirements, define relevant Usecases and work out a corresponding list of required Nuage features & capabilities, and convert Usecase/Features into Testcases/Testplan.     
@hellt
hellt / srl23-7-1.json
Created September 4, 2023 07:14
SR Linux configuration as set by containerlab on boot
{
"_preamble": {
"header": {
"generated-by": "SRLINUX",
"name": "",
"comment": "",
"created": "2023-09-04T07:13:09.479Z",
"release": "v23.7.1",
"enabled-yang-features": ["srl_nokia-features:acl-policer-resource-utilization", "srl_nokia-features:admin-user-roles", "srl_nokia-features:anycast-gw", "srl_nokia-features:arp-nd-datapath-programming", "srl_nokia-features:bgp-add-paths", "srl_nokia-features:bgp-auth-password", "srl_nokia-features:bgp-cfg-afi-safi-list", "srl_nokia-features:bgp-graceful-restart-gaps", "srl_nokia-features:bgp-ipv6-next-hop-tunnel-resolution", "srl_nokia-features:bgp-local-as-container-iso-list", "srl_nokia-features:bgp-max-ecmp-hash-buckets", "srl_nokia-features:bgp-mtu-discovery", "srl_nokia-features:bgp-prefix-limit", "srl_nokia-features:bgp-restart-max-wait", "srl_nokia-features:bgp-rib-afi-safi-list", "srl_nokia-features:bgp-rib-afi-safi-route", "srl_nokia-features:bgp-single-hop-connected-check", "srl_nokia-features:bgp-unnumbered-peers",
<domain type='kvm' id='254'>
<name>PE-1-SR</name>
<uuid>af76b9d5-8bab-4156-b013-ec00968117f9</uuid>
<description>Timos VM</description>
<memory unit='GiB'>6</memory>
<currentMemory unit='GiB'>6</currentMemory>
<vcpu placement='static'>2</vcpu>
<resource>
<partition>/machine</partition>
</resource>
@hellt
hellt / R1_nokia.cfg
Created June 17, 2020 10:04
R1 Nokia baseline config
# TiMOS-B-14.0.R4 both/i386 Nokia 7750 SR Copyright (c) 2000-2016 Nokia.
# All rights reserved. All use subject to applicable license agreements.
# Built on Thu Jul 28 17:26:53 PDT 2016 by builder in /rel14.0/b1/R4/panos/main
# Generated SUN MAR 13 06:28:52 2016 UTC
exit all
configure
#--------------------------------------------------
echo "System Configuration"
@hellt
hellt / wait_for_ssh.py
Last active September 18, 2023 08:21
wait_for_ssh function continuously checks whether SSH transport is ready
import paramiko
import time
def wait_for_ssh_to_be_ready(host, port, timeout, retry_interval):
client = paramiko.client.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
retry_interval = float(retry_interval)
timeout = int(timeout)
timeout_start = time.time()