Tip of the Day: Setting the Email Address for FreeBSD's Daily/Weekly/Monthly Reports
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
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 Page Up and Page Down Keys in Leopard's Terminal.app 1
To expand on my last post about fixing the home and end keys in Terminal here is how to fix the Page Up and Page Down keys.
Follow the directions in my last post, but instead of choosing the end or home keys select the page up and page down keys.
Set action to send string to shell and in the text box copy and paste: \033[6~ for page down, and \033[5~ for page up in the text box under the action pull-down.
If you can't copy and paste, the key sequence goes as the following: ESC [ 6 ~ and ESC [ 5 ~ respectively. Those two key sequences should expand to the above text.
Tip of the Day: Fixing Home and End Keys in Leopard's Terminal.app 2
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

- Select the end key settings
- Change the action setting to send string to shell as below

- In the text box below the action setting, enter the key combination of ctrl-e.
- The text \005 should appear like below

- 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
TOTD: Installing Git on Mac OS X
Introduction
Git has become quite the popular version control system in the rails community. That being said I am announcing that I will stop using ports for my tutorials and install everything from source. There are advantages and disadvantages to this and the main reason is that I am sick of waiting for ports that are outdated.
Requirements
This install is quite easy. All the dependencies required ship with Mac OS X Leopard. That being said lets get started. For this to install successfully you must have the following installed on your computer:
- Apple Developer Tools
Installation
Download the latest package from Git At the time of writing this tutorial the current version is Git 1.5.5.
Below are the directions to completely install the Git version control system.
cd /usr/local/src
curl -O http://kernel.org/pub/software/scm/git/git-1.5.5.tar.bz2
tar -xjf git-1.5.5.tar.bz2
cd git-1.5.5
./configure --prefix=/usr/local
make
sudo make install