Skip to content

Instantly share code, notes, and snippets.

View noslin005's full-sized avatar

Nilson Lopes noslin005

  • Source Code Corp.
  • United States of America
View GitHub Profile
" Show line numbers
set number

" Allow normal pasting
set paste

" Set NPC analogues for set list
set listchars=eol:¬,tab:>-,trail:█,extends:>,precedes:<
@noslin005
noslin005 / vxlan-bridge-vlan-linux.md
Last active June 26, 2025 00:36
Encapsulate VLAN using VXLAN tunnels on Linux

VXLAN+VLAN+BRIDGE+LINUX

  • Both Host A and Host B are running Linux with identical VXLAN and VLAN aware bridge configurations.
  • They communicate through a VXLAN overlay (ID 100) carried over multicast (239.1.1.1) on UDP port 4789.
  • VLANs are extended across the VXLAN tunnel.
  • Subinterfaces br0.10 and br0.20 provide access to specific VLAN networks (10 and 20).
  • Devices on the same VLAN across hosts can directly communicate as if they are on the same Layer 2 segment.

Use iproute2 tools (testing)

@noslin005
noslin005 / tmux.conf
Created April 23, 2025 01:29
Tmux Config
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
bind -n F5 setw synchronize-panes

Firewall

# INTERNAL ZONE
firewall-cmd --set-default-zone=internal
firewall-cmd --zone=internal --add-interface=bond0 --permanent
firewall-cmd --zone=internal --add-service={dhcp,tftp,http,https,dns,nfs,mountd,rpc-bind} --permanent

DHCP

@noslin005
noslin005 / gnome-terminal.ini
Created February 19, 2025 01:18
Gnome Terminal Profile
[:b1dcc9dd-5262-4d8d-a863-c897e6d979b9]
background-color='rgb(23,20,33)'
font='Cascadia Code 16'
foreground-color='rgb(208,207,204)'
palette=['rgb(0,0,0)', 'rgb(205,0,0)', 'rgb(0,205,0)', 'rgb(205,205,0)', 'rgb(0,0,238)', 'rgb(205,0,205)', 'rgb(0,205,205)', 'rgb(229,229,229)', 'rgb(127,127,127)', 'rgb(255,0,0)', 'rgb(0,255,0)', 'rgb(255,255,0)', 'rgb(92,92,255)', 'rgb(255,0,255)', 'rgb(0,255,255)', 'rgb(255,255,255)']
use-system-font=false
use-theme-colors=true
authoritative;
allow bootp;
default-lease-time 600;
max-lease-time 7200;
log-facility local0;
ddns-update-style none;
# Parent class for all test
class "test" {
match concat(
slack-vm1:
default_gateway: 192.168.1.1
interfaces:
- name: eth0
addresses:
- 192.168.1.21/24
vlan: 100 # VLAN tag for an access port
- name: eth2
addresses:
- 10.12.0.10/16

Adjust Resolution

export DISPLAY=:1 
xrandr -q
xrandr --newmode "1920x1080"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
xrandr --addmode Virtual-1 1920x1080
xrandr --output Virtual-1 --mode 1920x1080
@noslin005
noslin005 / sample_script.sh
Last active November 26, 2024 16:59
Sample bash script
#!/usr/bin/env bash
################################################################################
## File: script.sh
## Desc: Sample bash argument processing
## Author: Nilson Lopes <[email protected]>
################################################################################
set -o nounset