Monday, January 21, 2013

Quinoa Soup

Recipe for Quinoa Soup

Recipe Ingredients:

1 cup quinoa
2 cups Chicken Broth
1/2 Yellow Onion
1 large Carrot
2 stalks Celery
2 Tbsp olive oil
1/2 cup slivered Cabbage
salt and pepper to taste

Cooking Directions:

1.  Olive oil in little pot, then cut onions, carrots and celery,place in pot and saute till tender.
2.  Add broth, quinoa, salt and pepper the cover and cook aprox 25 min.

Friday, September 21, 2012

Installing Asterisk 10.8.0 on CentOS 6.3 (64-bit)

The book “Asterisk: The Definitive Guide 3rd Edition” describes installing Asterisk 1.8.x.  This is my attempt to go through the installation instructions and adapt them for an Asterisk 10.8.0 install.  I assume you have CentOS 6.3 installed already and updated (yum update).

This guide follows the book’s installation type.  We will not be installing a pre-built package, but will be installing from the source code.  You can find package installation instructions at  Note that the packages are not always up to date and the book recommends installing the latest version from source.

Note 1: I am relatively new to Linux and completely new to Asterisk.  Perhaps this guide will help someone else perform the same operation I am doing, but this is mainly to chronicle my installation so that I can easily repeat it if necessary.

Note 2: For the purposes of this install, I have removed the “sudo” commands and will run all the commands as root (su –).

Remove any 32-bit libraries, perform a system update and reboot:

yum remove *.i386


yum update –y


# Reboot system if any updates were installed

Synchronize time and install the NTP (Network Time Protocol) daemon:

# Verify ntp daemon is installed
yum install –y ntp


# Set the current date/time from

# Verify ntp daemon runs at system startup
chkconfig ntpd on

# Start the NTP daemon
service ntpd start


Add a new system user “asteriskpbx”:

adduser asteriskpbx

passwd asteriskpbx


# Install sudo if not already present
yum install sudo

# Edit the /etc/sudoers file and add ‘asteriskpbx’

# NOTE: I added the entry manually using the following
echo 'asteriskpbx ALL=(ALL) ALL' >> /etc/sudoers


# Also add an entry for the group “wheel”
echo '%wheel ALL=(ALL) ALL' >> /etc/sudoers

# Edit /etc/group file and modify the line that starts
# with wheel so it reads: wheel:x:10:root,asteriskpbx

Install software dependencies:

yum install gcc.x86_64 gcc-c++.x86_64 make.x86_64 wget.x86_64 subversion.x86_64 libxml2-devel.x86_64 ncurses-devel.x86_64 openssl-devel.x86_64 vim-enhanced.x86_64


Create directory structure:

mkdir -p ~/src/asterisk-complete/asterisk

cd ~/src/asterisk-complete/asterisk

Check out the source code with Subversion (we will check out using a specific tag, 10.8.0)

svn co


(NEW) Install the SQLite3 development package:

yum install sqlite-devel.x86_64

To support Google Talk, install ikseml by downloading it from


tar -xvzf iksemel-1.4.tar.gz

cd ~/src/iksemel-1.4



make install

Build and install the software:

cd ~/src/asterisk-complete/asterisk/10.8.0



make install

make config

To install the asterisk program documentation (optional, requires doxygen):

# Verify doxygen is installed (for me, it was already)
yum install doxygen

make progdocs

Install additional sound prompts from menuselect:

cd ~/src/asterisk-complete/asterisk/10.8.0/

make menuselect

make install

Modify file permissions of the folders Asterisk was installed to:

chown -R asteriskpbx:asteriskpbx /usr/lib/asterisk/
chown -R asteriskpbx:asteriskpbx /var/lib/asterisk/
chown -R asteriskpbx:asteriskpbx /var/spool/asterisk/
chown -R asteriskpbx:asteriskpbx /var/log/asterisk/
chown -R asteriskpbx:asteriskpbx /var/run/asterisk/
chown asteriskpbx:asteriskpbx /usr/sbin/asterisk

On CentOS, disable SELinux:

# Change the value of SELINUX from enforcing to disabled, then REBOOT
nano /etc/selinux/config

Create the /etc/asterisk/ directory and copy the indications.conf sample file into it:

mkdir -p /etc/asterisk

chown asteriskpbx:asteriskpbx /etc/asterisk

cd /etc/asterisk/

cp ~/src/asterisk-complete/asterisk/10.8.0/configs/indications.conf.sample ./indications.conf

Copy the sample asterisk.conf file into /etc/asterisk and uncomment and change runuser= and rungroup= to asteriskpbx:

cp ~/src/asterisk-complete/asterisk/10.8.0/configs/asterisk.conf.sample /etc/asterisk/asterisk.conf

nano /etc/asterisk/asterisk.conf

Create the modules.conf file. Enable loading of modules automatically, and disable extra modules:

$ cat >> /etc/asterisk/modules.conf
; The modules.conf file, used to define which modules
; Asterisk should load (or not load).
; Resource modules currently not needed
noload =>
noload =>
noload =>
noload =>
noload =>
; PBX modules currently not needed
noload =>
noload =>
; Channel modules currently not needed
noload =>
noload =>
noload =>
noload =>
noload =>
noload =>
noload =>
; Application modules currently not needed
noload =>
noload =>
noload =>
noload =>
noload =>
noload =>
noload =>
noload =>
noload =>
noload =>
noload =>
noload =>
noload =>
noload =>
noload =>
noload =>
noload =>
noload =>
noload =>
noload =>
noload =>
noload =>
noload =>
noload =>
noload =>
noload =>
noload =>


Configure musiconhold.conf:

$ cat >> musiconhold.conf
; musiconhold.conf


At this point the system should be ready to configure the dialplan and channels.  First, log out and then log in as asteriskpbx.  Enter the following command to ensure you have sudo access:

sudo ls /root/

Finally, to make life easier, include /usr/sbin and /sbin in the PATH variable for asteriskpbx.  Edit the file with nano or something similar.

# change PATH=$PATH:$HOME/bin to PATH=$PATH:$HOME/bin:/usr/sbin:/sbin
nano .bash_profile

At this point Asterisk looks to be installed successfully.  I will blog again with any updates.  I will be working on getting this working with our PBX at work (and my VOIP phone) and with Google Talk and with Skype.

Installing FireFox 15 (or latest version) on CentOS 6.3 (or 6.x) via yum

Distilled from

(Optional) Backup current FireFox profiles

tar -cvzf $HOME/mozilla-firefox-profiles-backup.tar.gz $HOME/.mozilla/firefox/

Change to root user

su -

Install Remi repository

rpm -Uvh
rpm -Uvh

(Optional) Check for available versions

yum --enablerepo=remi list firefox

If you already have an older version of FireFox installed, then UPDATE

yum --enablerepo=remi update firefox

Otherwise INSTALL

yum --enablerepo=remi install firefox


Thursday, September 20, 2012

Installing VirtualBox Linux Guest Additions for CentOS 6.3

To install the VM Guest Additions for VirtualBox 4.1.22 on CentOS 6.3, I worked through the instructions found at

As detailed at we must install RPMforge first, so we can install the DKMS (Dynamic Kernel Module Support) required by the Virtual Box Linux Additions.

The following must be done with root privileges. I logged in as root for this operation.

Install RPMforge


rpm --import

rpm -K rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

rpm -i rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

Install DKMS (Dynamic Kernel Module Support)

yum --enablerepo rpmforge install dkms

Ensure the development environment and kernel source are installed

yum groupinstall "Development Tools"

yum install kernel-devel

Install Guest Additions

In VirtualBox, under the Devices menu, select the VBoxGuestAdditions.iso image for the CD/DVD drive.  The autorun should execute and you should be able to install it from there.  If the autorun does not kick in, go to a terminal prompt and CD to the mountpoint and issue the command:



Once I performed those actions, I logged out of root and logged in under my own account.  The mouse no longer needed to be captured by the virtual machine.  You can resize the Virtual Box window and the CentOS desktop will resize.  Much better.

Wednesday, September 19, 2012

Console Progress/Status Output and Clear To End Of Line (EOL) (VB.NET)

When writing a .NET Console application, I sometimes have long-running processes for which I like to see status information displayed.  I could simply issue WriteLine statements and have the console window continuously scroll text, but I much prefer information to be displayed and updated in a single location.  Traditionally, what you would do is write some text (of length N) and then write N Ctrl-H characters (Backspace) which moves the cursor back to where it started.  Then when you write again, it overwrites the previous text.  Though, if the new text is shorter than the previous text, you end up with those extra characters – so what you want to do is write your text and then “clear to end of line” (EOL).  I finally got around to implementing that.

There are various ways to tackle this, but I use a couple functions: CONSOLE__WRITE to display text and backspace the cursor to where it started, and CONSOLE__CLEAR_EOL which clears text to the end of the line.  Actually, I incorporated the CONSOLE__CLEAR_EOL as an optional (default True) parameter to CONSOLE__WRITE.

Here are the routines..

    Public Sub CONSOLE__WRITE(ByRef szText As String, Optional ByVal bClearEOL As Boolean = True)
        'Output the text
        'Optionally clear to end of line (EOL)
        If bClearEOL Then CONSOLE__CLEAR_EOL()
        'Move cursor back to where we started, using Backspaces
        Console.Write(Microsoft.VisualBasic.StrDup(szText.Length(), Chr(8)))
    End Sub
    Public Sub CONSOLE__CLEAR_EOL()
        'Clear to End of line (EOL)
        'Save window and cursor positions
        Dim x As Integer = Console.CursorLeft
        Dim y As Integer = Console.CursorTop
        Dim wx As Integer = Console.WindowLeft
        Dim wy As Integer = Console.WindowTop
        'Write spaces until end of buffer width
        Console.Write(Space(Console.BufferWidth - x))
        'Restore window and cursor position
        Console.SetWindowPosition(wx, wy)
        Console.SetCursorPosition(x, y)
    End Sub

Here is a little test program…


Here is a sample of it running..


And when it has completed..


Thursday, August 30, 2012

Juice Fasting

(click image to enlarge)


Well, I am getting ready for a real juice fast.  I have been reading and hearing (movies, documentaries) for over a couple years.  I’ve juiced like this before but never gone on a fast.  Last year, after my wife and I married and returned from our honeymoon in Aruba, we are 100% raw food for a month.

Now I am interested in a juice fast, only drinking vegetable+fruit juices for 30 days; more if I feel like I am on a roll.  For the most part I am pretty lean, but I would like to drop the excess adipose fat and then concentrate on building more muscle.  Exercise make ‘em grow, nutrition make ‘em show!

Some of the documentaries I have watched include “Fat, Sick and Nearly Dead (2010)”, “Food Matters (2008)”, “Forks over Knives (2011)”, “Raw For Life (2007)”, “Simply Raw (2009)” and plenty of others like “Super Size Me (2004)” as well as a generous helping of Dan “The Man” on YouTube (life regenerator!) – including a couple of his CD’s “Raw Kitchen Essentials” and “Life Saving Salads & Dressings”.

My tools of choice are a Vitamix 5200 ($450) and a Breville 800JEXL ($300).