Archive for December, 2008

9th December
2008
written by Nick Anderson

I use vim for the vast majority of my editing. It can be a bit cumbersom to hit esc each time you want to perform a command while in insert mode. Using ctrl o will put you in command mode for the next command. Give it a try sometime it may or may not make you more effective with vim.

Tags:
8th December
2008
written by Nick Anderson

I have a pretty good memory when it comes to juggling multiple tasks but I am (and have been for some time) trying to break my self of using my brain to store everything. One area a worklog benefits is when you want to look back over time and see what your were working on several months ago (this can be helpful for reviews). At any rate there are many tools to do similar things. At any rate I wrote a simple tool to try and help with this. Feel free to take it modify it or comment on the horrible code. (more…)

Tags: ,
6th December
2008
written by Nick Anderson

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 [email protected] < $TEMPLOG
rm $TEMPLOG
Tags: , , , ,
6th December
2008
written by Nick Anderson

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).

Tags: ,
5th December
2008
written by Nick Anderson

I was recently asked how to change screens working directory. It took me a few minutes to realize the benefit of this as I typically have different screen sessions for different purposes. But after thinking about it for a few minutes I have been in situations where what I was doing in a screen session morphed and it would have been nice for new windows to be opened to a different working directory than where I started my session.

A few minutes of grepping around in man -a screen gave the answer.

C-a:chdir /path/to/new/dir
Tags:
Previous
Next

BLOGROLL

ARCHIVE