Skip to content

Instantly share code, notes, and snippets.

@peo3
peo3 / hello.patch
Created November 2, 2013 07:18
Add hello.so app to OSv. How to compile and run: make; /scripts/run.py -e 'hello.so'
diff --git a/bootfs.manifest b/bootfs.manifest
index c04c161..b3e6479 100644
--- a/bootfs.manifest
+++ b/bootfs.manifest
@@ -76,4 +76,5 @@
/libzfs.so: libzfs.so
/zfs.so: zfs.so
/tools/mkfs.so: tools/mkfs/mkfs.so
+/hello.so: hello.so
@peo3
peo3 / linux-4.6.0.vbox.config
Created May 21, 2016 16:33
Linux 4.6.0 kernel config for VirtualBox
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.6.0 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_PERF_EVENTS_INTEL_UNCORE=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
@peo3
peo3 / gist:4258274
Created December 11, 2012 12:38
Unknown git behavior...
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
$ cd linux/
$ git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: include/uapi/linux/netfilter/xt_CONNMARK.h
# modified: include/uapi/linux/netfilter/xt_DSCP.h
@peo3
peo3 / setup_lxc_rootfs_fedora15.sh
Created August 12, 2011 14:52
How to boot up Fedora 15 with systemd inside Libvirt LXC
#!/bin/sh
# Setup a rootfs of Fedora 15 for libvirt lxc
#
# The rootfs is based on http://download.openvz.org/template/precreated/fedora-15-x86_64.tar.gz
#
# See also
# - http://www.mail-archive.com/lxc-users@lists.sourceforge.net/msg01707/lxc-fedora.in
if [ $# != 1 ]; then
@peo3
peo3 / ulp-comp.c
Last active December 19, 2017 15:51
A sample program using ULP (it deflates/inflates payload of TCP transparent to userland)
#include <linux/module.h>
#include <linux/zlib.h>
#include <net/tcp.h>
#include <net/inet_common.h>
MODULE_AUTHOR("peo3");
MODULE_DESCRIPTION("compression ULP");
MODULE_LICENSE("GPL");
@peo3
peo3 / kcm-sample.c
Last active December 20, 2023 18:18
A sample program of KCM
/*
* A sample program of KCM.
*
* $ gcc -lbcc kcm-sample.c
* $ ./a.out 10000
*/
#include <err.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>