Mostly about my amusement

Year: 2008 (page 15 of 22)

A great weekend

I can’t ever forget Mother’s Day since my birthday falls right next to it. Remembering does not sound like much but it’s an accomplishment for me. I have been forgetting one of my best friend’s birthdays for 35 years.

In addition to enjoying my birthday, Lily and I had a great weekend with the kids.

Saturday was the kid’s last ice skating lesson from 11 till 11:30.  We stayed until 3 PM and both kids were exhausted. The girl likes skating, but the boy enjoys it much more.  This is one of the few things where he can go really fast and not get into trouble!

Sunday we took the kids to the Mets game.  To celebrate the holiday they gave Lily and the girl a pink baseball cap.  Naturally the boys had to buy their own and we ended up supporting the economy.

Mets game

Lily took the picture. The kids know how to smile, I don’t know why they made those faces…

Usually Lily and I go to evening games so we always leave right after the 7th inning.  This game started at 1 in the afternoon so we stayed till the end.  The kids had trouble following the action but they sure liked the cheering when the Mets hit two home runs.  The Mets won 8-3 and we headed back to Flushing to pick up the car and go home.

We have to take the kids to more ball games; we all had a great time.

Myanmar government is a real class act

After the situation that the U.S. government created with the whole Katrina mess, it’s hard to come down on how other people handle a disaster. I mean, people are still recovering in Louisiana and Mississippi. The U.S. just does lip service to areas that were devastated in 2005.

Luckily the military in Myanmar makes it so easy to throw stones. After hemming and hawing about permitting help to their country, they are now distributing the aid but slapped on their generals names on the boxes.

My favorite part is

State-run television continuously ran images of top generals — including the junta leader, Senior Gen. Than Shwe — handing out boxes of aid to survivors at elaborate ceremonies.

Nothing like setting priorities. Over 20,000 people are reported dead, they are about to see a real disease problem, and these people are looking for good press.

I know that politicians use anything for a photo op and our politicians do that as much as anyone. But this is a military junta, who do they think they are fooling?

Myanmar is not the U.S. so I do not think we will see someone telling the generals to go flip themselves. But I can hope.

Finished Valve’s Portal and the Cake is a Lie

Remember when the platform was sliding into the fire pit and I said ‘Goodbye’ and you were like ‘NO WAY!’ and then I was all ‘We pretended we were going to murder you’? That was great!

I usually don’t play current games on my PC so I just got and completed Valve’s Portal.

It’s a first person shooter without the shooting. It’s all puzzle solving and your opponent is a computer that runs the “Enrichment Center”. The dialog from the computer is great and at the end the computer treats you to a song.

It’s a great game, lots of fun.

Upgraded to Ubuntu 8.04 LTS

My Ubuntu T40 laptop is “only MOSTLY dead”.  The built in LCD display is too dark to read and I replaced it with a HP laptop running Vista Home Premium.

I feel slightly guilty about running Vista on it but it runs really well so ptthhhhppp.  I put the T40 onto it’s docking station and hooked it up in the basement with the other equipment.

The upgrade was easy as usual.  Just sudo su – and update-manager -d.  It took a while to download the files but a reboot later and I’m running.

This new Ubuntu feels faster.  It’s hard to really quantify that with old hardware, but it does.  So far the only issue I have is that the spell checker in Firefox 3 beta 5 is broken sometimes (I had to use the one built into WordPress for this post).

It’s like a refined version of 7.10.

I hope Amazon wins this one

Amazon is suing New York state over the “Amazon Tax” law. I hope they win for a couple of reasons.

  1. This law is just aimed at fixing something the state does not like: people buy items from out of state and don’t pay the use tax. If anyone actually pays this tax I would be surprised. I’m not commenting on if people should of should not pay use tax (it’s the law) but sales tax is collected by the store for the state. If the tax is not collected at the time of purchase, who keeps good enough records for all their transactions?
  2. I understand that this law was Eliot Spitzer’s idea. The man was a grandstander who went for big headlines over something useful. Sheriff of Wall Street? More like gadfly of Wall Street. His “penalties” did not really change anything but it did get his name in the papers.

Years ago NY sent officials to photograph NY cars in New Jersey shopping malls. They sent letters to the cars owner saying “Bad Monkey, you should pay your use tax.” This did not go over very well and the idea was quickly abandoned.

If the State of New York does not like federal law they can take it up with Washington. If they want to compete with online stores versus brick based stores in NY then they should fix the tax laws to actually compete and not convince people to go online or even out of state.

It’s tempting for law makers to target companies like Amazon and other online stores. It does not personally cost the lawmaker anything. But it also does not solve anything either and that probably makes it more appealing to the law makers.

.htaccess fix for machine translation

The current version of ATPP is 5.1 and it works really well. But occasionally I get speed bumps from Babelfish and Google translation engines so I end up turning it off for a while.

Without the plugin, when someone goes to the translated version of a posting, they get redirected to the home page.

For example the German pages for Andre’s trip to Disneyland is

http://blog.dembowski.net/2008/01/30/andres-trip-to-disneyland/de/

When I turn off the plugin users get sent to

http://blog.dembowski.net/

Here is where .htaccess comes to the rescue. By adding lines at the top of my .htaccess file I can send the request for a translated post to the English version:

RewriteRule ^de/ http://blog.dembowski.net/ [R=302,L]
RewriteRule ^zh/ http://blog.dembowski.net/ [R=302,L]
RewriteRule ^ko/ http://blog.dembowski.net/ [R=302,L]
RewriteRule ^ja/ http://blog.dembowski.net/ [R=302,L]
RewriteRule ^pt/ http://blog.dembowski.net/ [R=302,L]
RewriteRule ^it/ http://blog.dembowski.net/ [R=302,L]
RewriteRule ^es/ http://blog.dembowski.net/ [R=302,L]
RewriteRule ^(.*)/de/ http://blog.dembowski.net/$1/ [R=302,L]
RewriteRule ^(.*)/zh/ http://blog.dembowski.net/$1/ [R=302,L]
RewriteRule ^(.*)/ko/ http://blog.dembowski.net/$1/ [R=302,L]
RewriteRule ^(.*)/ja/ http://blog.dembowski.net/$1/ [R=302,L]
RewriteRule ^(.*)/pt/ http://blog.dembowski.net/$1/ [R=302,L]
RewriteRule ^(.*)/it/ http://blog.dembowski.net/$1/ [R=302,L]
RewriteRule ^(.*)/es/ http://blog.dembowski.net/$1/ [R=302,L]

The request from /some/url/here/de/ results in the Apache server sending back a 302 temporarily moved to the same URL minus the two letter language code.

If I have to turn off the ATPP plugin for an extended time, I can do so knowing that search engine visitors will still find the original post.

Update: added portion for languages off of the root i.e. http://blog.dembowski.net/es/ becomes http://blog.dembowski.net/

Opensuse and apache vhosts

OpenSUSE Logo from OpenSUSE.usThis happens often. I do something on my servers and six months later I try to rebuild from scratch what I did and wish I wrote it down. This is one of those blog posts.

I reviewed my Apache error logs and noticed that WordPress was tossing fatal PHP errors. I was pretty sure it was a particular plugin but I had made so many changes to Apache and PHP5 and I thought it would be easier to remove and re-install Apache and PHP5. So I switched my blog to my backup VPS, updated DNS and took apart my server.

That turned out to be a little painful and more work looking up how to set it up.

Removing the packages was simple. I just ran rpm -qa | egrep “php5|apache” to get the list of packages and created a small shell script to removed them. But I had forgotten how I had setup the virtual servers for more than one website. I wanted to avoid using the old config because I was sure I had made mistakes.

I had setup the main server dixie.dembowski.net and that worked. My MRTG and Cricket scripts were displaying correctly. Getting additional virtual hosts turned out to be easy.

In /etc/apache2/vhosts.d directory is a file called vhost.template. I copied that file and called it blog.dembowski.net.conf. I edited that copy and change all the dummy-host.example.com to the fully qualified name of my server. In vi thats just :0,%s/dummy-hosts.example.com/blog.dembowski.net/g and all the dummy names were changed.

I removed the cgi portion and added some additional Directory, AllowOverride, and Options statements. I set -Indexes and made other changes so that the rewrite rules for WordPress will work.

I saved that file in /etc/apache2/vhosts.d and that permited that my blog virtual server to work. But that caused my existing server dixie.dembowski.net to stop working. That was simple to fix. I created a file in /etc/apache2/vhosts.d called _dixie.dembowski.net.conf. The underscore character ensures that this file will be read first; the first virtual server becomes the default.

This file was very short and contained only these lines:

NameVirtualHost *:80
<virtualHost *:80>
ServerName dixie.dembowski.net
DocumentRoot /srv/www/htdocs
</virtualHost>

This let the web server at /srv/www/htdocs work as if had before I made the virtuals.

I restart Apache and all is well. I did the same thing for my one SSL host in Apache. Unlike clear text http, the SSL based https can’t do multiple SSL sites on one IP address/TCP port. I could run one on 443 and another on a different port, but I don’t bother as I only need one SSL based site.

As long as a DNS entry exists to point that name to your IP address, you can have multiple web sites served from one IP address.