Skip to content

Instantly share code, notes, and snippets.

View smallnest's full-sized avatar

smallnest smallnest

View GitHub Profile
@smallnest
smallnest / agent loop
Created March 11, 2025 00:38 — forked from jlia0/agent loop
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet
@smallnest
smallnest / bench_test.go
Created February 21, 2025 02:29
go []byte <-> string benchmark
package main
import (
"fmt"
"runtime"
"testing"
"unsafe"
)
func toBytes(s string) []byte {
@smallnest
smallnest / skbtracer.c
Created December 13, 2024 04:25 — forked from chendotjs/skbtracer.c
ebpf-skbtracer
#include <bcc/proto.h>
#include <uapi/linux/ip.h>
#include <uapi/linux/ipv6.h>
#include <uapi/linux/icmp.h>
#include <uapi/linux/tcp.h>
#include <uapi/linux/udp.h>
#include <uapi/linux/icmpv6.h>
#include <net/inet_sock.h>
#include <linux/netfilter/x_tables.h>
@smallnest
smallnest / mac-vendor.txt
Created December 8, 2024 13:30 — forked from aallan/mac-vendor.txt
List of MAC addresses with vendors identities
000000 Officially Xerox
000001 SuperLAN-2U
000002 BBN (was internal usage only, no longer used)
000003 XEROX CORPORATION
000004 XEROX CORPORATION
000005 XEROX CORPORATION
000006 XEROX CORPORATION
000007 XEROX CORPORATION
000008 XEROX CORPORATION
000009 powerpipes?
@smallnest
smallnest / software_rdma.md
Created November 13, 2024 03:44 — forked from Chester-Gillon/software_rdma.md
Software RDMA interoperability

0. Introduction

Notes about software RDMA interoperability to communicate with hosts which have RDMA capable network adapters.

1. Documentation for software RDMA

Looked for documentation about how to use software RDMA

1.1 Red Hat Enterprise Linux 8

@smallnest
smallnest / token.go
Created October 31, 2024 04:18
switch-case vs table-finding
package main
import (
"fmt"
"strings"
"time"
)
func handleEventError(tokenName string, line, pos int) error {
err := fmt.Errorf("error at line %d, pos %d: %s", line, pos, tokenName)
;; 作者: 一泽Eze
;; 名称:创意名片生成
;; 版本: 1.0
;; 模型: Claude-3.5-sonnet
;; 用途: 根据公司Logo生成灵活、创意的名片模板,准确反映品牌调性
;; 定义未实现的函数(占位符)
(define (分析 elements)
;; 实现分析逻辑
'分析结果)
@smallnest
smallnest / udp.c
Created December 19, 2023 08:48 — forked from fntlnz/udp.c
XDP Drop udp example
#include <linux/bpf.h>
#include <linux/in.h>
#include <linux/if_ether.h>
#include <linux/ip.h>
#define SEC(NAME) __attribute__((section(NAME), used))
SEC("dropper_main")
int dropper(struct xdp_md *ctx) {
int ipsize = 0;
@smallnest
smallnest / xdp_manglepong.c
Created December 19, 2023 08:38 — forked from teknoraver/xdp_manglepong.c
Sample XDP program to mangle ICMP echo replies
/*
* xdp_manglepong.c - sample XDP program
* Copyright (C) 2019 Matteo Croce <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,