Stop custom editing core WordPress files… It’s all here: http://codex.wordpress.org/Writing_a_Plugin. It only seems like a small mountain the first time through. ;-)
Slashdot Redesign
Wow, I am surprised that after all this time Slashdot changed its look [slashdot.org]:
LibreOffice 3.3 Released
The fork of OpenOffice (LibreOffice) has been released in stable form and is ready for download. Some of the more exciting new features are listed below as seen on the “Featured Selection” portion from the New Features page on the LibreOffice site :
- Import SVG pictures into Draw and edit them interactively
- New easy-to-use dialog box for title pages
- Navigator lets you unfold one heading as usual in a tree view
- Easy-to-find “new sheet” tab button (colorable tabs)
- MS Works import filter
- Lotus Word Pro import filter
- Useful bundled extensions, such as Presenter View in Impress
- 1 million rows in a spreadsheet in Calc
- Improved slide layout handling in Impress
- Much improved wordperfect import
Saying Goodbye
Roomba on the prowl
I find myself in a completely tiled apartment while also having acquired a Roomba 4210. No more constant dirt and pet hair… Though, if I were the iRobot developers, I would quickly add the following features to the low end Roomba…
- RF remote, instead of the IR remote.
- Find the dock without fail (use RF, signal strength, and other associated homing technologies).
- A camera, why can’t I see what Roomba sees?
- Remote control via mobile (especially WIFI, see: AR Drone).
- I know the upper models have schedules, but why not the lower end… how about every day at 3am?
- I’m sure newer models don’t have as many problems, but come on… the lower end shouldn’t get stuck so often on raised areas, underneath desks and dressers, and refuse to start on black carpets…
Mobile WebApp Frameworks
So I went digging for mobile webapp frameworks, and I found a nice list to investigate at a later time. While I have used iUI in the past, and it worked well for my purposes… I have read a few reasons why you may consider others (CiUI). Also, I seem to think that there would be some obvious advantages (and disadvantages) to using a cross-platform mobile webapp framework like PhoneGap and others.
Here the list I came up with:
Update (2010-08-13). I just found this article: Announcing the jQuery Mobile Project
Once they get up and running, I imagine it will be a serious contender with the others.
Update (2010-08-18). Here’s an article from Mashable about some of the frameworks and libraries talked about above (and others): HOW TO: Make Your Mobile Websites Act More Like Native Apps
Gnome background changer
Gnome 2.3 on Ubuntu 10.04 LTS (Lucid Lynx) doesn’t appear to have an automatic wallpaper changer built in. While it appears there are many ways to accomplish this, I decided to write my own little script to get some time in with bash… alternative ways I have found include using “Wallpaper-tray” (which doesn’t appear to be in 10.04), Desktop Drapes, or a variation of the script below using things like “gconftool-2“.
To use this script, do the following:
- Right-click on the desktop and choose “Change Desktop Background“
- Look through the backgrounds, and make sure the ones listed are the ones you want to have the script randomly select
- Open up a text file using “gedit“, and add the contents of the script:
#!/bin/bash installedDir=~/Pictures/backgrounds/random i=0 while read line; do data=`echo "${line}" | grep -i filename` if [ "$data" != "" ]; then filenameCutLength=$((${#data}-11)) filename=$(echo $data | cut -b11-$filenameCutLength) if [ "$filename" != "(none)" ] || [ "$filename" != "random.img" ]; then extension=$(echo ${filename,,} | cut -b$(expr ${#filename} - 2)-${#filename}) if [ "$extension" == "jpg" ] || [ "$extension" == "png" ] || [ "$extension" == "svg" ]; then fileArray[$i]=$(echo $filename) i=$(expr $i + 1) fi fi fi done << EOF $(grep deleted="false -A7 ~/.gnome2/backgrounds.xml) EOF fileArrayLength=`echo $[ ( $RANDOM % ${#fileArray[@]} ) ]` cp "${fileArray[$fileArrayLength]}" "$installedDir/random.img"
- Save the file as “gRandomBackground.sh” in a directory (this example uses: “/home/$USER/Pictures/backgrounds/random”, if you install it elsewhere, be sure to change the $installedDir variable in the script)
- Open “Terminal” and enter the command:
crontab -eIf you haven’t used crontab before, stick with the default, “nano“ - Paste the following as one line into the editor:
0 */3 * * * bash ~/Pictures/backgrounds/random/gRandomBackground.shThis will change the background every three hours, on the hour. “Ctrl+O, and then Ctrl+W” should get the crontab saved and also get you exited out of nano. For more information on how to use cron, see Google. - Open up the “Appearance Preferences” dialog again, by right-clicking on the desktop and selecting “Change Desktop Background“
- Click the “Add…” button and browse to the directory that gRandomBackground.sh is installed to
- Select the “random.img” background, click the “Open” button, and then the “Close” button
Your background should change every three hours.
McAfee deleted svchost.exe
Wednesday afternoon I had at least two reports of workstations that were suddenly rebooting on their own. No networking and no taskbar were also symptoms. I thought it may be a virus, so I did a few scans with some of the well known Windows malware scanning tools, all the while thinking… why didn’t McAfee catch this? After two hours of scanning and no positives on the scans, I decided to rebuild the machine, but declared that I would begin on it the next day.
Well… turns out, McAfee was the issue. I got an email from them that read in part like this: “Our initial investigation indicates that the error can result in moderate to significant performance issues on systems running Windows XP Service Pack 3.” Moderate to significant? One person affected couldn’t get on the network, had no taskbar, and their computer was auto rebooting… That sounds more like extreme systemic failure! :-)
For verification of the issue, see the following screenshot:

Here are some steps I took to fix it (taken mostly from the following website: http://brianseekford.com/index.php/2010/04/21/how-to-fix-the-mcafee-svchost-crash-from-the-virus-definition-update/)
- Boot workstation in safe mode and login as an administrative user
- Press the following keys: CTRL-ALT-DEL.
- Click the “File>Run” menu item, type in “cmd”, and press the “Enter” key
- Run the command: del “C:Program FilesCommon FilesMcAfeeEngineavvscan.dat”
- Next, we have to copy a replacement svchost.exe from the system if available. Some have found it in “c:windowssystem32dllcache” and I found it in “C:Windows$NtServicePackUninstall$” so I will go with the instructions for what I had on this particular system…
- within the “cmd” window type the following below:
- cd C:Windows$NtServicePackUninstall$”
- copy svchost.exe c:WindowsSystem32
- Next, restart the workstation, login, and update McAfee to the latest dat file. As of this writing they have replaced the broken 5958 dat with 5959.
- Once McAfee has been updated, I had to restarted the workstation again to get McAfee to report as being updated.
And more reading regarding the issue:
http://www.cnet.com.au/how-to-fix-your-mcafee-crippled-computer-339302608.htm
http://www.switched.com/2010/04/21/mcafee-update-sends-windows-xp-machines-into-endless-reboot/
Screensavers in Ubuntu 9.x
I used to do some incredible tweaking for my screensaver in Ubuntu, especially because gnome-screensaver wouldn’t allow for editing the particular screensaver options like xscreensaver would (see: https://wiki.ubuntu.com/ScreenSaver). These days, I don’t want to tweak… I just want the thing to shut off when I am watching fullscreen flash video, so that I don’t have to wiggle the mouse every ten minutes. :-)
So I made a simple toggle script and created a launcher for the script on the desktop. Gonna watch video? Double-click the icon. Done watching video, double-click the icon.
#!/bin/bash PID=`pidof gnome-screensaver` if [ "$PID" != "" ]; then #gnome-screensaver is running shut it down killall -9 gnome-screensaver else #gnome-screensaver is not running, start it up gnome-screensaver fi
Post via script
I just whipped up some PHP and threw it in the root of a brand new WordPress 2.9.2 install:
<?php include_once('wp-config.php'); include_once('wp-load.php'); include_once('wp-includes/wp-db.php'); $my_post = array(); $my_post['post_title'] = 'My post'; $my_post['post_content'] = 'This is my post.'; $my_post['post_status'] = 'publish'; $my_post['post_author'] = 1; wp_insert_post( $my_post ); ?>
Voila. The post appeared when navigating to the .php file.
See: http://codex.wordpress.org/Function_Reference/wp_insert_post.
For more creativity, get into the database: http://codex.wordpress.org/Function_Reference/wpdb_Class


