Author Archives: matt
Making plans to retire in Tucson
Someday! Check back soon for an update.
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
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 … Continue reading
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 … Continue reading
Belle Plaine outlaws Ultimate Fighting
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.
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. … Continue reading
Committees and Board WordPress Plugin
Displaying the Committees View Members Edit Member Update Member Press the “add new member button” Add New Member