13 November 2008

ALSA record output to file

In ~/.asoundrc


pcm.!default {
type file
slave.pcm {
type plug
slave.pcm {
type hw
card 0
device 0
subdevice -1
}
}
file /dev/shm/audio.raw
format raw
}


Note the file it's been recorded to is in RAM to make things faster.
You can convert the raw audio to mp3 file with the following:

ffmpeg -ac 2 -f s16le -i /dev/shm/audio.raw -acodec mp3 -ab 192k output.mp3

11 November 2008

~/.bashrc

Edit ~/.bashrc

alias l="ls -l"

sudo

Add full permissions to a selected group and set it so it doesn't ask for confirming password.

in /etc/sudoers:


%wheel ALL=(ALL) ALL
%wheel ALL=NOPASSWD: ALL

Log Watch

After installing logwatch, edit the configuration file to set the email to send reports to.

On most standard installs, check
/etc/cron.daily/00-logwatch

And also
/etc/log.d/logwatch.conf


Optionally also install an SMTP replacement to send emails, using an external mail server if sendmail isn't doing the work for you.