Select random picture
Thursday, November 24th, 2005The following command selects a random picture from the directory for the current year, copies it to the file random.jpg and stores the path in file.txt.
#!/bin/sh cd $HOME/public_html/images year=`date +\"%Y\"` file=`/usr/X11R6/bin/xscreensaver-getimage-file --name $year` cp $file random.jpg echo $file > file.txt
It can be used to generate a random background image by e.g. running it as a hourly cron job.
WordPress database error: [Can't open file: 'wp_comments.MYD'. (errno: 144)]
SELECT COUNT(comment_ID) FROM wp_comments WHERE comment_post_ID = 80 AND comment_approved = '1';
WordPress database error: [Can't open file: 'wp_comments.MYD'. (errno: 144)]
SELECT COUNT(*) FROM wp_comments WHERE comment_post_ID = '80' AND comment_approved = '1'