Archive for December, 2011
Server overload warning
by z3n on Dec.27, 2011, under Linux Happyness, Tips & Hints
Problem:
So i have this shitty server that keeps overloading, although i have all sort of monitors around, many screens, etc I really can’t keep looking at the graphs all day long, but yet i’m almost of the time on the computer.
So why not have a sound trigger when server load go over 10?
Solution:
This php script solves it:
// (c) z3n - R1V1@111227 - www.overflow.biz - rodrigo.orph@gmail.com
while (true) {
$output = explode(" ", trim(substr(strstr(exec("uptime"), "load average:"), 13)));
if (substr($output[0], 0, -1) > 10)
@ passthru("echo -e -n \\\\a");
echo "\r[" . date("Y-m-d H:i:s") . "] " . implode(" ", $output);
sleep(5);
}
Facebook auto poker
by z3n on Dec.27, 2011, under Linux Happyness, Tips & Hints
I wrote this macro with XTE intended to run on linux on a VNC screen, nothing a regular geek wouldn’t understand.
Never loose a poke war ever again:
while [ 1 ] ; do xte 'mousemove 20 350' 'mouseclick 1';sleep 5;xte 'mousemove 300 235' 'mouseclick 1';sleep 30;done;