Tip of the Day: Setting the Email Address for FreeBSD's Daily/Weekly/Monthly Reports

Posted by Ben Allen Wed, 14 May 2008 18:14:00 GMT

FreeBSD by default runs three sets of periodic scripts that outputs a volume of information about your system's current state. The output of these scripts are sent to the root account's mailbox. If you are like me and have a number of FreeBSD servers, its a pain to go check this mailbox on each machine. Well here is an easy fix to send the output of the scripts to any email address.

Edit /etc/periodic.conf and add:

daily_output="ben@domain.com"
daily_status_security_output="ben@domain.com"
weekly_output="ben@domain.com"
monthly_output="ben@domain.com"

To test that this is working run: periodic daily as root. The security run output should arrive in your mailbox.

Tip of the Day: Set Git Author and Email [Updated] 1

Posted by Ben Allen Wed, 14 May 2008 06:38:00 GMT

Quick tip, especially if you use GitHub with Gravatar so a little profile picture will show up on GitHub you likely need to set your Author and Email for Git. So instead of falling back to your system username and machine name for an email address (at least on the Mac), and your account's long name for author name, Git will use the correct information and your gravatar will show up in GitHub (minimally just match your email with your Gravatar account).

Run the following commands:

git config --global user.name 'Your Name'
git config --global user.email ben@domain.com

This will add entries to your ~/.gitconfig file under the [User] section.

Thats it. See me on GitHub here: http://github.com/unilogic

Thanks Tim for the correct way of doing this.
Resource: http://cheat.errtheblog.com/s/git

Tip of the Day: Fixing Home and End Keys in Leopard's Terminal.app 2

Posted by Ben Allen Mon, 12 May 2008 01:01:00 GMT

By default in Terminal.app the home and end scroll the the top of the screen and the end of the screen buffer respectively. To make Terminal act like a normal console (in other words the home key moves the cursor to the beginning of the line, and the end key moved the cursor to the end of the line, etc) do the following:

  • Open Terminal
  • Open Terminal's preferences
  • Goto the Settings Tab
  • Goto the Keyboard Tab as shown below Terminal Settings
  • Select the end key settings
  • Change the action setting to send string to shell as below End Key Setting
  • In the text box below the action setting, enter the key combination of ctrl-e.
  • The text \005 should appear like below End Key Setting Entered
  • Click OK
  • Select the home key
  • Change the action setting to send string to shell
  • For this key enter the key combination of ctrl-a
  • The text \001 should appear like below
  • Click OK and close the preferences.

The end and home keys should now act like a normal console in Terminal. Enjoy!

Resource: http://blog.yiqiang.org/2007/12/fixing-home-and-end-key-for-terminalapp.html