Skip to content

Instantly share code, notes, and snippets.

View niloysh's full-sized avatar
:octocat:

Niloy Saha niloysh

:octocat:
View GitHub Profile
@niloysh
niloysh / Vagrantfile
Created October 7, 2025 15:53
Vagrantfile for Ubuntu 22.04
################################################################
# Vagrantfile for libvirt/KVM with Ubuntu 22.04
################################################################
# Vagrant + libvirt: Ubuntu 22.04 with NAT (default).
Vagrant.configure("2") do |config|
# Base box
config.vm.box = "generic/ubuntu2204"
@niloysh
niloysh / k8s-tools.sh
Last active October 7, 2025 05:17
Install k8s tools
#!/usr/bin/env bash
# k8s-tools.sh - Install a bunch of useful Kubernetes tools and helpers.
# Installs:
# - metrics-server (patched with --kubelet-insecure-tls)
# - krew + kube-capacity (kubectl resource-capacity)
# - helper commands in ~/bin: kx (exec), kl (logs), kc (capacity), kcp (copy)
# Author: Niloy Saha
# Date: 2024-06-20
@niloysh
niloysh / interface-monitor.sh
Created October 7, 2025 02:56
Interface monitor script
#!/bin/bash
# ==============================================================================
# Script Name: interface-monitor.sh
# Purpose: Monitor TX/RX throughput and packet rate on a network interface
# Author: Niloy Saha
# Date: 2025-08-20
# ==============================================================================
#
# Description:
# This script monitors a specified network interface and displays:
@niloysh
niloysh / vagrantbox_sshcfg.py
Created October 7, 2025 02:31
Vagrantbox SSH helper script
#!/usr/bin/env python3
"""
vagrantbox_sshcfg.py -- Generate SSH config snippets for Vagrant VMs on remote hosts.
Config file lines (whitespace separated):
<alias> <remote_user> <remote_host> <vagrant_dir> <vm_name>
Example:
box1 vagrant remote1.example.com /path/to/vagrant1 default
box2 vagrant remote2.example.com /path/to/vagrant2 web
@niloysh
niloysh / vxlan_topo.py
Created October 7, 2025 02:18
VXLAN overlay network script
#!/usr/bin/env python3
"""
vxlan_topo.py — Interactive OVS+VXLAN topology deployer. This creates an overlay
network using Open vSwitch and VXLAN tunnels between multiple Linux hosts.
Usage:
python3 vxlan_topo.py topo.json
python3 vxlan_topo.py topo.json --teardown [--remove-bridges] [--show-ovs] [--add-ips] [--ping-test]
@niloysh
niloysh / cu-offload-bridge.sh
Last active October 7, 2025 02:28
Automate CU offloading by bridging eth2 to n3br for GTP-U traffic
#!/bin/bash
set -euo pipefail
# ==============================================================================
# Script Name: cu-offload-bridge.sh
# Purpose: Automate CU offloading by bridging eth2 to n3br for GTP-U traffic
# Author: Niloy Saha
# Date: 2024-08-14
# ==============================================================================
#
@niloysh
niloysh / ubuntu-sleep.yaml
Created February 9, 2024 19:41 — forked from tcdowney/ubuntu-sleep.yaml
Ubuntu Sleep Pod
apiVersion: v1
kind: Pod
metadata:
name: ubuntu
labels:
app: ubuntu
spec:
containers:
- image: ubuntu
command: