This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | |
| #include <linux/module.h> | |
| #include <linux/kernel.h> | |
| #include <linux/livepatch.h> | |
| #include <linux/seq_file.h> | |
| #include <linux/string.h> | |
| #include <linux/sched.h> | |
| #include <linux/pid_namespace.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Use centos | |
| FROM centos:centos7 | |
| MAINTAINER [email protected] | |
| COPY mysql57-community-release-el7-8.noarch.rpm /tmp/ | |
| COPY make_netmask.sh /tmp/ | |
| RUN ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime && \ | |
| yum localinstall -y /tmp/mysql57-community-release-el7-8.noarch.rpm && \ | |
| yum update -y && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env stap | |
| %{ | |
| #include <linux/sched.h> | |
| #include <linux/thread_info.h> | |
| #include <linux/pid_namespace.h> | |
| %} | |
| function show_pidtree:long(pn:long) %{ | |
| struct task_struct *task; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <unistd.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <sched.h> | |
| #include <sys/types.h> | |
| #include <sys/wait.h> | |
| #define SCHED_LIFO 7 | |
| #define GET_CURRENT_POLICY 9999 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| KERNDIR := /lib/modules/`uname -r`/build | |
| BUILD_DIR := $(shell pwd) | |
| VERBOSE = 0 | |
| obj-m := bulk_alloc.o | |
| smallmod-objs := bulk_alloc.o | |
| all: | |
| make -C $(KERNDIR) SUBDIRS=$(BUILD_DIR) KBUILD_VERBOSE=$(VERBOSE) modules |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| def read_file(filename) | |
| ret = [] | |
| File.open(filename) do |f| | |
| f.each_line do |line| | |
| ret << line.split(',')[1].to_i | |
| end | |
| end | |
| return ret |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| require 'pp' | |
| class Emulator | |
| @@EAX = 0 | |
| @@ECX = 1 | |
| @@EDX = 2 | |
| @@EBX = 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [ $# != 4 ]; then | |
| echo "usage $0 [vmlinuz name] [bzimage file name] [System.map file name] [output dir]" | |
| exit 1 | |
| fi | |
| KERNEL_NAME=$1 | |
| BZIMAGE_NAME=$2 | |
| SYSTEMMAP_NAME=$3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import time | |
| import sys | |
| last_rx = 0 | |
| last_tx = 0 | |
| first_time = True | |
| def print_bps(iface, line): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "use strict"; | |
| var wd = require("wd"); | |
| require('colors'); | |
| var chai = require("chai"); | |
| var chaiAsPromised = require("chai-as-promised"); | |
| chai.use(chaiAsPromised); | |
| var should = chai.should(); | |
| chaiAsPromised.transferPromiseness = wd.transferPromiseness; |