Skip to content

Instantly share code, notes, and snippets.

@jlkiri
jlkiri / ipv6_filter.c
Created January 15, 2023 16:09
IPv6 user ID filtering eBPF code
#include <linux/bpf.h>
#include <linux/in.h>
#include <linux/in6.h>
#include <linux/if_ether.h>
#include <linux/ip.h>
#include <linux/ipv6.h>
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_endian.h>
#include <stdbool.h>
@jlkiri
jlkiri / useFetchStream.js
Last active April 14, 2023 02:26
useFetchStream
import { useState, useEffect, useMemo } from "react";
const MIMETypes = {
json: response => response.json(),
text: response => response.text(),
blob: response => response.blob(),
arrayBuffer: response => response.arrayBuffer(),
formData: response => response.formData()
};