Skip to content

Instantly share code, notes, and snippets.

@lamehost
lamehost / get_xr_openconfig_proto_modules.sh
Last active February 3, 2022 12:45
Generates python3 protobuffer modules for the OpenConfig YANG files for Cisco IOS-XR
#!/bin/bash
# For this to work you need the following packages installed on your computer:
# - protobuf-compiler
# - git
# - go
# - python3
BASEDIR=$(pwd)
@lamehost
lamehost / CDP message generator
Last active December 23, 2021 13:42
Simple CDP message generator
"""
Simple CDP message generator.
You have to "pip install scapy" to make it work
"""
import argparse
from time import sleep
import socket
from scapy.all import *
@lamehost
lamehost / Jinja2 whitespaces.md
Last active January 20, 2023 15:28
Jinja2 whitespaces

Jinja2 whitespaces

Dealing with Jinja2 whitespaces it’s a nightmare.
Here’s my trick to get rid of that pain.

Let’s say that you have an array like this:

[
 {

Keybase proof

I hereby claim:

  • I am marzettimarco on github.
  • I am evangelion (https://keybase.io/evangelion) on keybase.
  • I have a public key whose fingerprint is EE93 B053 B2A6 81BD E5FE 00F9 63C0 DC80 EBBC 5239

To claim this, I am signing this object: