Skip to content

Instantly share code, notes, and snippets.

View lavoiesl's full-sized avatar

Sébastien Lavoie lavoiesl

View GitHub Profile
@lavoiesl
lavoiesl / sysbench.sh
Last active December 19, 2015 11:58 — forked from anonymous/sysbench.sh
#!/usr/bin/env bash
dir=$(mktemp -d /tmp/sysbench.XXXX)
cd $dir
sysbench --batch=4 --test=cpu --cpu-max-prime=20000 run
sysbench --batch=4 --num-threads=64 --test=threads --thread-yields=100 --thread-locks=2 run
sysbench --batch=4 --num-threads=16 --test=mutex run
@lavoiesl
lavoiesl / cron.sh
Last active December 10, 2015 04:28 — forked from anonymous/cron.sh
Run a script with lowest priority
#!/bin/sh
# $$ represents the current PID
# Set to lowest I/O priority
ionice -c idle -p $$
# Set to lowest CPU priority
renice -n -20 -p $$ >/dev/null
@lavoiesl
lavoiesl / remove_crap.sh
Created May 30, 2012 13:05 — forked from anonymous/remove_crap.sh
Remove temporary and junk files from Windows and OS X
#!/bin/bash
#
# Script to remove temporary and junk files from Windows and OS X
#
### Not set up to run as root. Advised not to do this. ###
#### Variables ####
# Files to remove (Add others, just remember to increment the