Skip to content

Instantly share code, notes, and snippets.

View Callisto13's full-sized avatar
🌊

Claudia Callisto13

🌊
View GitHub Profile
extern crate inotify;
use std::path::PathBuf;
use inotify::{
WatchMask,
Inotify,
};

Switching the Kernel

I'm sure there are maaany ways to switch out the ubuntu kernel, here is what I do. Going from 4.4 to 4.10 as an example.

1. Download the kernel version that you're after

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10/linux-headers-4.10.0-041000_4.10.0-041000.201702191831_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10/linux-headers-4.10.0-041000-generic_4.10.0-041000.201702191831_amd64.deb
#!/bin/sh
mountandwrite() {
i=$1
echo "mounting $i"
mount -t overlay -o lowerdir=./lower,upperdir=./upper$i,workdir=./work$i overlay target$i
echo "writing $i"
dd if=/dev/urandom of=target$i/foo bs=10M count=10
}
@Callisto13
Callisto13 / timewaster.sh
Last active July 24, 2017 14:48
Script to extract timings for spiky vizzini runs
#!/bin/bash
export PATH=/var/vcap/packages/cfdot/bin:$PATH
LOG_DIR=/var/vcap/sys/log
export GARDEN_STDOUT_LOGS="$LOG_DIR/garden/saved.log"
REP_STDOUT_LOGS="$LOG_DIR/rep/saved.log"
VIZZINI_ID="$1"
FORMAT="%s\t\t\t%s\n"