Skip to content

Instantly share code, notes, and snippets.

@peo3
peo3 / config-3.8.2-206.vbox.fc18.x86_64
Created Mar 12, 2013
A sample configuration of a minimal x86_64 kernel with user namespace for VirtualBox.
View config-3.8.2-206.vbox.fc18.x86_64
# x86_64
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 3.8.2 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
@peo3
peo3 / try_virt-sandbox.sh
Last active Dec 12, 2015
How to try virt-sandbox on Ubuntu 12.10.
View try_virt-sandbox.sh
sudo aptitude install autoconf
sudo aptitude install libtool
sudo aptitude install libcap-ng-dev
sudo aptitude install libvirt-glib-1.0-dev
sudo aptitude install libglib2.0-dev
sudo aptitude install libglib2.0
sudo aptitude install libxml2-dev
sudo aptitude install libselinux-dev
sudo aptitude install gtk-doc-tools
sudo aptitude install libvirt-bin
@peo3
peo3 / config-3.7.4-204.vbox.fc18.x86_64
Created Feb 6, 2013
A configuration for a small custom kernel of Fedora 18 on VirtualBox.
View config-3.7.4-204.vbox.fc18.x86_64
# x86_64
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 3.7.4-204.vbox.fc18.x86_64 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
@peo3
peo3 / gist:4258274
Created Dec 11, 2012
Unknown git behavior...
View gist:4258274
$ 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 / gist:3464550
Created Aug 25, 2012
cgroup-utils: git diff v0.3..v0.4 --stat
View gist:3464550
$ git diff v0.3..v0.4
.gitignore | 4 +
Changelog | 14 ++++
Changelog.md | 10 +++
README | 195 ++++++++++++++++++++++++++++++++++++++++++++++++-
README.md | 30 +++++---
README.rst | 180 ---------------------------------------------
cgutils/cgroup.py | 449 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------
cgutils/command.py | 11 +--
cgutils/commands/__init__.py | 2 +
@peo3
peo3 / gist:3157001
Created Jul 21, 2012
cgroup-utils supports autogroup
View gist:3157001
$ cgutil tree -t -k --show-autogroup
<root>
+test
+system
| +sm-client.service
| | `sendmail
| +sendmail.service
| | `sendmail
| +vboxadd-service.service
| | `VBoxService
View gist:3090225
[fedora17 cgroup-utils]$ cgutil pgrep systemd
/: 1
/system/systemd-logind.service: 576
/system/systemd-journald.service: 359
[fedora17 cgroup-utils]$ cgutil pgrep systemd -l -f
/: 1 /usr/lib/systemd/systemd
/: 1321 /bin/python /bin/cgutil pgrep systemd -l -f
/system/systemd-logind.service: 576 /usr/lib/systemd/systemd-logind
/system/dbus.service: 607 /bin/dbus-daemon --system --address=systemd: --nofork --systemd-activation
/system/systemd-journald.service: 359 /usr/lib/systemd/systemd-journald
@peo3
peo3 / Makefile
Created Jun 23, 2012
cgroup LKM example
View Makefile
obj-m = cgroup-notifier-counter.o
KVERSION = $(shell uname -r)
all:
make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean
@peo3
peo3 / store_bundle_in_sqlite3.java
Created Feb 11, 2012
Store an arbitrary Bundle object into a SQLite database ref: http://qiita.com/items/2386
View store_bundle_in_sqlite3.java
/* store a bundle */
Bundle bundle = // get a bundle from somewhere
final Parcel parcel = Parcel.obtain();
bundle.writeToParcel(parcel, 0);
byte[] bundleBytes = parcel.marshall();
parcel.recycle();
ContentValues values = new ContentValues();
values.put("bundle", bundleBytes);
SQLiteDatabase db = // create a db object
View gist:1669870
$ \ls -1 ~/git
bitcoin
btrfs-progs-unstable
cgroup-utils
iproute2
libvirt
linux
linux-stable
lxc
openflow