Archive for the ‘Technology’ Category
Invisible scheduled tasks on Windows XP
Just a note to self: to make a scheduled Windows XP task run invisibly, schedule it to run as NT AUTHORITY\SYSTEM:
Disabling RSS in WordPress
In some instances, it is desirable to disable generation of RSS feeds by WordPress. Akuna Matata presents a simple solution to this problem. Just add the following to your theme’s functions.php:
/** * Disable Our Feed Urls */ function disable_our_feeds() { wp_die( __('<strong>Error:</strong>' . 'No RSS Feed Available, ' . 'Please visit our <a href="'. get_bloginfo('url') . '">homepage</a>.')); } add_action('do_feed', 'disable_our_feeds', 1); add_action('do_feed_rdf', 'disable_our_feeds', 1); add_action('do_feed_rss', 'disable_our_feeds', 1); add_action('do_feed_rss2', 'disable_our_feeds', 1); add_action('do_feed_atom', 'disable_our_feeds', 1);
Defeating the Black Screen of Death
Equipment: a Toshiba Satellite A215-S7437 laptop (AMD Turion 64 X2, 2,048 MB DDR2 SDRAM, 200 GB HDD, DVD SuperMulti optical drive, 802.11b/g wireless network card) running Vista Home Premium.
Problem: an atypical Black Screen of Death. In most cases, the Black Screen of Death appears at boot; often, the mouse cursor is visible and draggable. In this case, however, the Black Screen of Death would appear randomly during the computer’s operation, causing the computer to freeze, power button being the only way to regain control. This would happen about once a day. Typically, Vista would reboot in normal mode without a problem, but every once in a while it would have to go through a lengthy restore process before booting up (I think the behavior at reboot depended on whether the computer was doing anything sensitive when it froze).
Possible solutions that didn’t work: (1) disabling event logging; (2) setting processor minimum to 100%.
Solution that worked: upgrading BIOS software to the latest version available from Toshiba Support. So far, over a week without a single black-screen incident.
Installing fonts in Fedora
Just a note to self… To install fonts (in this example, the Arial family) on a Fedora system:
- Log in as root
- Change to the font storage directory:
cd /usr/share/fonts - Create a subdirectory to hold the Arial family of fonts:
mkdir arial - Copy the Arial fonts into that directory.
- Make the font files accessible systemwide:
chmod 0775 -R arial - Run fc-cache on the new directory to cache the new fonts:
fc-cache arial
That should be it…
Upgrade to WordPress 2.8…
…seems to have been completed without a hitch. A separate source of happiness is that none of the plugins were broken in transition.
Solar panels get cheaper
From Business Week:
Solar Panels Get Cheaper
With Congress considering both a cap on carbon dioxide emissions and renewable energy requirements for power companies, utilities are trying to figure out how they’ll produce clean energy. One increasingly viable option: solar panels. Solar is still several times more expensive than wind or natural gas and many times pricier than coal, says John Rowe, CEO of Chicago-based utility giant Exelon (EXC). “But solar is where costs are improving the fastest.” One reason: Supplies of crystalline silicon, the base material used in most panels, are plentiful, thanks to climbing production capacity. On June 8, analysts at Barclays Capital (BCS) said they expect output in 2010 to top 138,500 metric tons, 13% more than originally predicted. At the same time, solar panel factories are now more cost efficient. In a recent issue of Science, the president of panel maker SunPower (SPWRA), Richard Swanson, says it will be possible to make crystalline solar panels for $1 per watt in five years, down from about $1.90 today. Competing thin-film (non-crystalline) panel makers say their somewhat less efficient product will get down to 70 cents per watt.
Either way, the solar power industry is closing in on the long-sought goal of “grid parity”—making electricity for a price that’s competitive, at least in high-priced U.S. markets such as California, where energy is typically produced with natural gas at about 12 cents per kilowatt hour. Clean technology research firm Clean Edge predicts partial parity by 2015.
“We think this opens up a huge market,” says Christopher O’Brien, head of market development at Oerlikon Solar, a Swiss maker of equipment to produce thin-film panels. A short-term problem for the recession-battered solar industry: Many deals are on hold as customers wait to see if they can get stimulus money.
include_HTML gets an update
I just updated include_HTML to version 0.3. This is basically a bug-fix release; it turned out that the solution I worked out to resolve compatibility issues with WordPress 2.7 was causing problems when trying to access URLs containing special symbols. I also added a little extra functionality; now you can include absolute local URLs starting with a forward slash; handy if the inclusion runs on the same server as the including instance of WordPress. Users are urged to upgrade.
An ethanol glut?
From Business Week:

Lobbying for a Better Blend
The ethanol industry is about to hit a wall—the “blend wall.” U.S. biofuel factories now have the capacity to make about 12 billion gallons of ethanol a year, and the U.S. market can’t use much more than that. That’s because annual U.S. gasoline consumption is about 137 billion gallons, and gas isn’t allowed to contain more than 10% ethanol, a blend called E10. If every drop of gas actually met that limit, the ethanol market would be 13.7 billion gallons. But for logistical reasons, a portion of the gas sold will never contain any ethanol.
The looming blend wall is making it harder to get new ethanol plants financed, so corn growers and ethanol producers are lobbying to increase the blend to allow up to 15% ethanol (E15). Opposing them: a coalition of oil producers, food companies, and green groups, which complained to the Environmental Protection Agency that raising the quotient may lead to higher food prices and other woes. In April, the EPA agreed to review the issue.
Introducing the Bookworm plugin
If you are familiar with Drupal, you are probably familiar with the concept of a “book”. A Drupal “book” is a collection of Web pages that are automatically tied together with proper hyperlinks, so that there is no need to build navigation manually. There is typically a table-of-contents page and a number of chapter pages. Recently, I needed to build a few “books” in WordPress, so I ended up writing a little plugin that I called Bookworm.
The data organization in WordPress allows to build “books” rather easily. WordPress pages are hierarchical, so it is possible to create any number of chapter pages to which the table-of-contents page would be a parent. So all you need is a way to automatically generate a table of contents (essentially, a linked list of the current page’s children) and a a way to automatically build a navigation menu with links to previous chapter page, table of contents, and next chapter page.
Enter the Bookworm plugin.
Put [bookworm_list_pages] into the table-of-contents page, and it will output a list of pages which list the current page as their parent. For now, pages can be listed only in order of their ID (which, conveniently, is also the order in which they were created). Putting [bookworm_flip_pages] into a chapter page will output hyperlinks to previous chapter, table of contents (which is assumed to be on the parent page), and next chapter.
The WordPress Projects page
It’s been a while since I wanted to give my modest WordPress-related efforts a place of their own. Well, here it is: the WordPress Projects page.
