Skip to content

Instantly share code, notes, and snippets.

@Zayat
Zayat / test_sd_stability.c
Created November 20, 2020 12:12
Testing soft-dirty bits stability
/**
* File : test_sd_stability.c
* Author : Mohamed Alzayat <alzayat@mpi-sws.org>
* Date : 19.11.2020
* Last Modified Date: 19.11.2020
* Last Modified By : Mohamed Alzayat <alzayat@mpi-sws.org>
* Adapted from: https://github.com/dwks/pagemap/blob/8a25747bc79d6080c8b94eac80807a4dceeda57a/pagemap2.c
* https://github.com/cirosantilli/linux-kernel-module-cheat/blob/25f9913e0c1c5b4a3d350ad14d1de9ac06bfd4be/kernel_module/user/pagemap_dump.c
* https://src.openvz.org/projects/OVZ/repos/criu/browse/criu/mem.c
*/
@Zayat
Zayat / multiple-url-paths.lua
Created April 24, 2018 15:53 — forked from anonymous/multiple-url-paths.lua
Benchmark multiple url paths with wrk
-- Resource: https://github.com/timotta/wrk-scripts/blob/master/multiplepaths.lua
-- Initialize the pseudo random number generator
-- Resource: http://lua-users.org/wiki/MathLibraryTutorial
math.randomseed(os.time())
math.random(); math.random(); math.random()
-- Shuffle array
-- Returns a randomly shuffled array
function shuffle(paths)
@Zayat
Zayat / daemon.py
Created July 15, 2017 21:24 — forked from josephernest/daemon.py
Daemon for Python
# From "A simple unix/linux daemon in Python" by Sander Marechal
# See http://stackoverflow.com/a/473702/1422096
#
# Modified to add quit() that allows to run some code before closing the daemon
# See http://stackoverflow.com/a/40423758/1422096
#
# Joseph Ernest, 2016/11/12
import sys, os, time, atexit
from signal import signal, SIGTERM