Mostly about my amusement

Month: June 2010 (page 1 of 1)

The SCOTUS handgun ruling

From the New York Time letter page. This is not my letter, but the sentiment is the same.

To the Editor:

Every year, millions of people across the United States willingly have their First Amendment rights to free speech and assembly restricted when local governments hand out permits for parades. The governments decide who can march, where they can march and when they can march, and require them to have a permit.

The recent Supreme Court ruling on the Second Amendment seems to set the right to buy and bear arms above the rights of the First Amendment. It deprives local governments of their right to decide who can carry a weapon, where they can carry a weapon and when they can carry a weapon, and, for all we know today, may lead to a time when people can carry concealed weapons without a permit.

Words are almost always harmless. Unfortunately, guns, by design, are never so.

Zachary I. Gold
Massapequa Park, N.Y., June 29, 2010

That’s what I don’t get. We routinely accept controls and limitations to our constitutional rights and these are done as a “common sense” measure.

No one says “let’s stifle freedom of speech and assembly”, but I can’t get 200 of my close friends for a protest without filing and obtaining a permit.

We have freedom of speech but no one expects that to permit someone yelling “FIRE!” in a crowded theater.

How are guns different? We can restrict some rights but why does the 2nd amendment get a pass on limitations or controls? I know full well that the ruling is about the outright ban on handguns, and is not about “Guns for everyone!” But if the law is re-worded, will it still pass this test?

Why can’t a state regulate that some types of guns are just not allowed?

Thumbnail credit goes to leasepics / Lala Roe for the image.

What would we do without political cartoons?

The second thing I look at on the NY Times website is the cartoons.

Oh, now SCOTUS is concerned about rights. Good thing for Jeff Skilling this case didn’t involve someone being kidnapped and shipped overseas to be tortured.

In addition to President Obama maintaining the worst of the previous administration, his Supreme Court nominee (while qualified) represents someone who is more like Roberts and less like Stevens.

When Elena Kagan is confirmed, there is no hope that SCOTUS will oppose expansion of the president’s power when national security is used as the excuse.

WordPress 3.0 is gold

It’s here and it’s “Thelonious”.

Now unless you are capable of

  1. Backing up your WordPress blog completely
  2. Performing the manual upgrade by hand
  3. Capable of restoring your file and database backup 100% yourself in case something goes seriously wrong

then consider waiting before adopting WordPress 3.0 on your blog.

The 3.0 release is BIG and things will fail on some setups. At this moment, there is no reason to rush into this release.

At some point soon, yes do upgrade. Keeping current is valuable and makes your blog easier to obtain support. But for now consider waiting.

Jon Stewart is a comedian?

The Daily Show should be required viewing for anyone looking to get into public service.

I do like and admire President Obama, but Jon Stewart’s video clip really highlights that all politicians lie.

http://www.thedailyshow.com/watch/tue-june-15-2010/respect-my-authoritah

President Obama is getting a beating in the polls because of the BP oil spill. But where it really counts, we’re getting a third term for GWB.

At least the economy is doing better.

Pool algorithm?

Tomorrow we’re having some friends over, so today I’m doing pool duty. This involves me vacuuming the portions that the robot does a bad job on, and then tossing in said robot so it can do it’s thing.

Around 7 AM I turned on the filter pump, went over the lines where the pool slopes meet, and made my way around the pool. I started on the deep end, made my way around, and checked that I didn’t leave any big patches. Not complicated just tedious.

I ended up with a bucket full of leaves, dead bugs, and some pebbles. I turned off the filter pump and tossed in the robot. It’ll take 2 hours for it to run it’s cycle.

This is what geeks think about: How does it make a decision to go one way or the other? When it hits a boundary it sometimes climbs up the wall. Other times it pauses and goes back and turns. In a couple of hours I’ll pull it out and wash it’s filter. That will have a bagful of leaves, sand, bugs, etc.

It’s work, but watching it run is a kick for me. Later on I’ll double check how clean it is by doing some swimming with the family.

Mac vs PC was never this fun

Think bullets?

“I’m a Mac.”

“I’m a PC! Welcome to my world!” <*BANG!*>

I remember having Commodore 64 vs Apple II+ debates. It’s a shame there was no Team Fortress 2 back then. Or Valve, Internet, multiplayer online games…

Google XML Sitemaps and WordPress Multisite

Update August 13th, 2011: I’ve switched over and am giving a new plugin a try. It’s called Better WordPress Google XML Sitemaps (with sitemapindex and Multi-site support) and so far so good.

What really convinced me to look at this one is that the guys at WP Engine added it to their Curated Plugins list. If they are giving this a try then that’s really all justification I need.

Update July 23rd, 2011: These instructions still work for the newer 3.2.5 version as well. While this simple modification is useful, I plan to switch the to the 4.0 beta.

Update: Arne has posted an early test version on the WordPress support forums here. At this stage it’s not yet ready for release. If you would like to test that version, you can support Arne’s effort by downloading and reporting any issues to him on that thread.

I’m lazy and have not yet tried the early release version. 🙂

——————————————————–

WordPress 3.0’s Multisite feature is cool and useful. The Google (XML) Sitemaps Generator plugin is also cool and useful. Unfortunately Arne Brachhold’s excellent plugin does not work with multisite blogs.

If you activate the plugin on a multisite enabled WordPress install, you get this error message.

Which is a shame, but it did not take me a long time to find a work around. My setup is using multisite with sub-domains and with the Domain Mapping plugin. These instructions are for the 3.2.4 version of the plugin.

1. Modify the plugin

Edit the file wp-content/plugins/google-sitemap-generator/sitemap.php and comment out lines 53 to 58 to look like this

//Check for 3.0 multisite, NOT supported yet!
// if((defined(‘WP_ALLOW_MULTISITE’) && WP_ALLOW_MULTISITE) || (function_exists(‘is_multisite’) && is_multisite())) {
// if(function_exists(‘is_super_admin’) && is_super_admin()) {
// add_action(‘admin_notices’, array(‘GoogleSitemapGeneratorLoader’, ‘AddMultisiteWarning’));
// }
//
// return;
// }

You can delete these lines, but I prefer to comment them out.  All this does is prevent the plugin from detecting the multisite setup and not becoming active.

2. Get your rewrite rules ready

In your blog’s .htaccess file add these lines above your WordPress rules

RewriteRule ^sitemap.xml sitemap-%{SERVER_NAME}.xml [L]
RewriteRule ^sitemap.xml.gz sitemap-%{SERVER_NAME}.xml.gz [L]

This will come in handy later.

3. Activate the plugin and set these options

Now on each of your sites in your WordPress network, activate the Google (XML) Sitemap plugin. Do not Network Activate it.

Now got to your XML-Sitemap options page and for “Location of your sitemap file” select Custom location.

In the custom location change your change the file name sitemap.xml to sitemap-yourblogservername.xml. My server name is blog.dembowski.net so I’m using sitemap-blog.dembowski.net.xml. Save the options.

Look in your WordPress installation’s root and check if you have sitemap.xml or sitemap.xml.gz. If you do then delete them both.

Now at the top of that options page, click on “rebuild the sitemap manually” and confirm that your new sitemap-yourblogservername.xml has been created.

4. Test and confirm that this worked

Now test two things. Start by pointing your browser to http://yourblogservername/sitemap.xml and then http://yourblogservername/sitemap-yourblogservername.xml. If you setup your .htaccess rewrite rules correctly, then both URLs should work.

Load up your WordPress generated robots.txt file via http://yourblogservername/robots.txt and look at the Sitemap line. Mine reads like this

User-agent: *
Disallow:

Sitemap: http://blog.dembowski.net/sitemap-blog.dembowski.net.xml.gz

I have that rewrite rule in case the default location for the sitemap is used.  When you load the sitemap via the normal location, the rewite rule sends it to the correct location. The second gziped sitemap URL is fine.

There should be no real sitemap.xml or sitemap.xml.gz files in your blog’s root directory. Instead, each sitemap file should have your virtual WordPress network names instead.

5. Rinse and repeat

Repeat this process for each site in your WordPress Network and you can continue to use this sitemap plugin. You will need to activate the plugin in each of your sites and change sitemap.xml to include the site name just as I outline in step 3.

6. The caveat

If this works for you, great! But if it doesn’t, please don’t bug Arne. If and when he makes his plugin multisite compatible, then it will be probably a better solution than this one. I’m not seeing any PHP errors or warning in my log files, but there may be reasons why this is not a good idea.

Also, when you modify your copy of a plugin in the WordPress plugin repository and that plugin is updated you will lose your edits from step 1 when you update the plugin.

In the meanwhile, I can continue to use this excellent plugin.

Converted to WordPress 3.0 Multisite

I have a few blogs and I’ve been maintaining them each one at a time. So when a new version of WordPress is released or plugins get updated, I end up repeating the same process 5 times.

WordPress 3.0 (I’m using 3.0-RC2 as of this writing) supports multisite functionality. One set of software runs multiple sites and I only need to keep on that installation up to date. Setting up the multisite was easy and I just followed the instructions here.

For the WordPress part, I opted for the sub-domain model and with main blog as my existing blog.dembowski.net with all other blogs as *.blog.dembowski.net.

On the DNS and Apache2 portions, I added to my dembowski.net zone a new wildcard entry for *.blog.dembowski.net and added a ServerAlias in my Apache2 vhost for *.blog.dembowski.net to point to blog.dembowski.net.

I then did a WXR export of my existing blogs and imported them into the new setup. My existing blogs are blogname.dembowski.net, not blogname.blogs.dembowski.net. Not a problem. Once I had the data imported, I modified my Apache2 vhosts to point to the new install and followed Otto’s domain mapping tutorial and I’m good to go.

There is some learning for me to do. Not all plugins work in the multisite setup  and I’m working out which ones can be Network Activated or need to be activated in each instance. I’ve doped out the vhost issues including SSL, so that’s not a problem. But this is new and somethings will not work as it used to.

Cool. This ought to be a lot of fun.

Tom Toles gets it right

Once again, Tom Toles nails it.

I especially get a kick from Sarah Palin complaining and editorializing about President Obama. The oil spill is a mess, but instead of getting together and fixing it, the radical right is just trying to score cheap points.