Archive for December 6th, 2008
Some projects have production code that runs off of a git cloned repository. There may be a case in which you want to notify others when that clone pulls. It is a pretty easy feat with gits post-merge hook. The post-merge hook will run after a merge (think git pull). All you have to do it create a project/.git/hooks/post-merge shell script and chmod +x it. Next time you pull successfully that script will run. Here is an example.
#!/bin/bash
TEMPLOG=$(mktemp)
echo "Sending email notification of update"
git log --reverse --no-merges --stat @{1}.. < $TEMPLOG
sendEmail -u "Production code update notification" -t recipient@domain.com < $TEMPLOG
rm $TEMPLOG
I see Samuel Huckins just had a post about apachetop http://dancingpenguinsoflight.com/2008/12/top-for-apache-activity/ which I have been meaning to mention for a while, but being that there is a fresh post about it I will mention Mytop instead.
Mytop is top for mysql. It can be used for monitoring the threads and overall performance of a MySQL.
Its an easy install in debain with a quick aptitude install mytop.
Here is some example output (sorry my mysql server isnt very busy atm).
