Skip to content

Instantly share code, notes, and snippets.

View shekkbuilder's full-sized avatar

shekk shekkbuilder

View GitHub Profile
@willb
willb / ptr_inspect.c
Created October 3, 2008 01:57
This is some example code showing how to use the ptrace system call under Linux to trace the system calls of a child process.
/*
ptr_inspect.c
Demonstration code; shows how to trace the system calls in a child
process with ptrace. Only works on 64-bit x86 Linux for now, I'm
afraid. (Even worse, it's only tested on Linux 2.6....)
The callname() function looks clunky and machine-generated because it
*is* clunky and machine-generated.
@tmm1
tmm1 / em-strace-filter.rb
Created March 1, 2009 05:28
filter strace logs for an epoll em reactor to find latency
#!/usr/bin/env ruby
#
# Use to filter strace output associated with ruby/EM processes running with EM.epoll
# sudo strace -ttTp <ruby process pid> -o ruby.strace
# cat ruby.strace | ./em-strace-filter.rb > filtered.strace
#
require 'time'
begin_time = nil
end_time = nil
@pklaus
pklaus / README.md
Last active December 4, 2022 14:33
README and manual page from Intel Linux Driver e1000e v3.0.4.1

e1000e Linux* Base Driver for Intel® Network Connection

================================================================================

January 13, 2014

================================================================================

@zachelko
zachelko / skater.cpp
Created April 8, 2010 06:23
Basic C/C++ code obfuscator.
// Zach J. Elko
// 2010
// skater.cpp
//
// I've wanted to make one of these for a while now. I got bored and
// whipped this up in about 3 hours. There are a lot of improvements
// that can/should be made, but it's not bad for the short amount of
// time put into it.
//
// Basic C/C++ code obfuscator.
#!/usr/bin/python
import socket
import struct
import sys
# We want unbuffered stdout so we can provide live feedback for
# each TTL. You could also use the "-u" flag to Python.
class flushfile(file):
def __init__(self, f):
@erenon
erenon / doublelinked.c
Created November 19, 2010 20:46
Simple double linked list implementation in C
#include <stdio.h>
#include <stdlib.h>
#define SENTINEL_VALUE -1
typedef struct _list {
int value;
struct _list *prev;
struct _list *next;
} list;
@llj098
llj098 / Makefile
Created December 23, 2010 01:36
a sample tcp server runs in kernel
obj-m += tcp_svr_sample.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clea
@fbs
fbs / Makefile-0-0-1
Created January 14, 2011 18:43
A simple makefile
# TOOLS
CPP = g++
CC = gcc
# MORE TOOLS
SIZE = size
OBJCOPY = objcopy
OBJDUMP = objdump
#PROJECT RELATED STUFF
@huyng
huyng / reflect.py
Created February 7, 2011 17:57
A simple echo server to inspect http web requests
#!/usr/bin/env python
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE
# Written by Nathan Hamiel (2010)
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from optparse import OptionParser
class RequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
@catphive
catphive / closure.c
Created February 21, 2011 18:40
example of a GNU C program that needs an executable stack
#include <stdlib.h>
#include <stdio.h>
int main() {
int count = 0;
int compar(const void *left_ptr, const void *right_ptr) {
int left = *(int*)left_ptr;
int right = *(int*)right_ptr;
++count;
return left - right;