Skip to content

Instantly share code, notes, and snippets.

View frgaudet's full-sized avatar
🏠
Working from home

Frédéric Gaudet frgaudet

🏠
Working from home
View GitHub Profile
apiVersion: v1
kind: Namespace
metadata:
name: external
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: tinyproxy
namespace: external
@theojulienne
theojulienne / traceicmpsoftirq.py
Last active January 11, 2024 12:38
ICMP packet tracer using BCC
#!/usr/bin/python
bpf_text = """
#include <linux/ptrace.h>
#include <linux/sched.h> /* For TASK_COMM_LEN */
#include <linux/icmp.h>
#include <linux/netdevice.h>
struct probe_icmp_data_t
{
@mjohnsullivan
mjohnsullivan / parse_json.go
Created December 14, 2015 23:17
Parse JSON objects with arbitrary key names in Go using interfaces and type assertions
// Parsing arbitrary JSON using interfaces in Go
// Demonstrates how to parse JSON with abritrary key names
// See https://blog.golang.org/json-and-go for more info on generic JSON parsing
package main
import (
"encoding/json"
"fmt"
)