Making plans to retire in Tucson

Tucson, Arizona

Tucson, Arizona

Someday!


Tucson, Arizona

Tucson, Arizona


Tucson, Arizona

Tucson, Arizona

Tucson, Arizona

Tucson, Arizona




Check back soon for an update.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
Posted in Travel, Tucson | Leave a comment

Pippy

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
Posted in Dogs | Leave a comment

Using grep to scrape web pages

In preperation to scrape a number of web pages, I used grep to make a list of URLs I need to scrape.  The list of URLs was in an RSS file.

grep -P “\<link><\![CDATA\[(.*?)]” hawkeye_stories.xml > hawkeye_stories_links.txt

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
Posted in Linux | Tagged , | 1 Comment

Bash script to backup a WordPress web site

The script (backup_site.sh) for backing up a site has been modified.  It now accepts parameters.

Parameter 1: domain
Parameter 2: database [optional]
Parameter 3: subdomain [optional]

Run as root

/home/root/sites/backup_site.sh gazlab.com matt_wp matt

#!/bin/bash

SITE=$1
SUBDOMAIN=$3
DBNAME=$2

if [ -z "$SUBDOMAIN" ]
then
if [ -z "$DBNAME" ]
then
mysqldump $DBNAME > /var/www/vhosts/$SITE/httpdocs/$DBNAME.sql
fi
tar -czvf $SITE.httpdocs.tar.gz /var/www/vhosts/$SITE/httpdocs
else
if [ -z "$DBNAME" ]
then
mysqldump $DBNAME > /var/www/vhosts/$SITE/subdomains/$SUBDOMAIN/httpdocs/$DBNAME.sql
fi
tar -czvf $SUBDOMAIN.$SITE.httpdocs.tar.gz /var/www/vhosts/$SITE/subdomains/$SUBDOMAIN/httpdocs
fi

exit 0

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
Posted in Linux, Server Admin | Tagged | Leave a comment

Saturday morning at Uncle Merlin’s lake

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
Posted in Travel | Leave a comment

is_home() not working in my WordPress plugin

When using is_home(), is_category(), is_page() etc. in my WordPress plugin that displays category-based ads, they kept returning NULL.

My problem was that I was calling this these function directly in my plugin. I resolved this by adding these call to my adHeaderSetup() function and setting the hook add_action(‘wp_head’, ‘adHeaderSetup’);

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
Posted in PHP, Wordpress | 1 Comment

Belle Plaine outlaws Ultimate Fighting

Fighting on the ground
Image by Stefan Tell via Flickr

My hometown, Belle Plaine, Iowa, had a bad experience after a recent show in the Legion Hall.  I say too bad.

The city council rushes to pass a new ordinance.

Reblog this post [with Zemanta]
Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
Posted in Fighting | Tagged | Leave a comment

Don’t upgrade yet!

I know how tempting it is to press that upgrade button, but don’t do it without backing up those files. Backing up your files first is just too quick and easy to skip when doing it from the command line. Here’s how:

Backup your MySQL database
DATE=`date | tr ” ” _`
mysqldump -u root -p DatabaseName > DatabaseName.$DATE.sql

Backup your web directory
tar cvzf new_filename.tar.gz /var/www/thiessen.us/httpdocs

c = create
v = verbose
z = compress
f = filename is being provided

If you need to restore these files

Restore MySQL database
mysql -u root -p DatabaseName < DatabaseName.Thu_Jun_11_08:14:41_CDT_2009.sql

Restore the web directory

cd /var/www/thiessen.us (change directory to the location of the web directory)

mv httpdocs httpdocs_bad (rename the current web directory)

tar -xzvf httpdocs.tar.gz (uncompress the backup)

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
Posted in Linux, Server Admin | Leave a comment

Create new ad content



Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
Posted in Wordpress | Leave a comment

Committees and Board WordPress Plugin

Displaying the Committees

menu

View Members

view members

Edit Member

edit member

Update Member

update member

Press the “add new member button”

add new member button

Add New Member

new member

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
Posted in How-to, Wordpress | Leave a comment