Skip to content

Instantly share code, notes, and snippets.

@rbbratta
rbbratta / encapOverhead.go
Created June 22, 2023 09:05
encapOverhead
package main
import (
"fmt"
"github.com/google/gopacket"
"github.com/google/gopacket/layers"
"github.com/google/gopacket/pcap"
"os"
)
@rbbratta
rbbratta / test_suppress.py
Last active January 26, 2017 23:27
testing contextlib.contextmanager traceback
#!/usr/bin/env python
# Copyright (c) 2016-2017 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@rbbratta
rbbratta / human_log.py
Last active September 21, 2015 21:34 — forked from steinim/human_log.py
# from https://gist.github.com/cliffano/9868180
# makes Ansible command output readable if added as a callback plugin
from __future__ import print_function
from __future__ import unicode_literals
import cgitb
cgitb.enable(format="text")
@rbbratta
rbbratta / distro_lib_v1.py
Created April 19, 2013 17:02
distro_lib_prototype
# Copyright(c) 2013 Intel Corporation.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for