Dec 282008
 

Yesterday was my fifth trip to the race track in the last year or so and my second without Zaira. She and I actually visited Golden Gate Fields a couple of weeks back, but I neglected to blog about it since it was another losing day for us both.  Yesterday, however was different in one very important way: I won!!!

You see, Golden Gate Fields sent me another Mystery Mutuel Voucher in the mail, worth up to $5,000 and only cashable yesterday. Just as it got us to the track two weeks back it did so again, although this time there was the added incentive of it being free calendar today.  And since I hadn’t purchased a 2009 calendar yet, this was pretty good motivation as well.

I arrived early (to insure I’d get the free calendar), cashed in my voucher (which turned out to be worth $2) and started betting on the East coast races via simulcast.  Although I managed to win $44.48 on a single $0.10 superfecta bet (picking the first four horses in exact order) those winnings and my original $100 stake were all but depleted by th etime the first local race at Golden Gate Fields occured.

In fact, I even gave my copy of the Daily Racing Form away to a group of about seven guys who were all trying to share a single copy as the last race I had bets on finished up.  It turns out I won $6 on that last race, which brought my current stake to $6.31 so I placed a $2 across the board bet (Win, Place, Show) on the long shot at Calder and planned on heading home.  Of course, the horse came in at 18 to 1 so I won just over $60!!  WooHoo!!  I placed a few more bets on the next race being run (at Faiorgrounds I think) and managed to win another $65, then lost $10 on the 2nd race at Golden Gate Fields and decided to go home a winner for once.

I walked back out to rover with $115 in my wallet and headed home, pleased to be a winner, but sad that Zaira couldn’t share the experience with me.  $15 may not be much of a win (especially when you consider parking, admission, gas, etc), but it was still a much more profitable trip then our visit to Gilroy Gardens’ Holiday Lights the night before.  We may be heading back to the track on Super Bowl Sunday as they have a tradition of giving away wide screen televisions on that day.  However I don’t think I’ll be investing in the Daily Racing Form anymore.  That $5 will be better spent putting it on the nose of the next frisky longshot 😉

Dec 242008
 

I got pretty excited back in August when I first heard that the Leonardo DaVinci exhibit Leonardo: 500 Years Into The Future would be making its only U.S. stop at the Tech Museum in downtown San Jose. Yet, for some reason I just kept not making it up there to see it and time was running short (the exhibit has been extended until January 25, 2009).  But when Zaira told me that there was a carnival set up right next to the exhibit (in conjunction with Christmas In The Park) I knew the time had come.

Unfortunately, I didn’t exactly wake up on the right side of the bed yesterday morning and it was the last chance I was going to have spare time with Zaira before the end of the year.  So off we went.  Before we even got to The Tech (while walking along San Carlos St.) we were suddenly accosted by a couple of giant characters from The Nutcracker Suite!  Zaira made friends with Mouse King, but was frightened of the Nutcracker’s vicious sword.  Not that I blame her, this guy’s definitely an intimidating enforcer of the state’s power.

We made our way across the street, into The Tech, and (with my wallet $40 lighter) into the Leonardo exhibit itself. The gist of the exhibit (as I understood it going in) was that modern craftsmen and artisans had created many of the machines and devices detailed in Leornardo’s notebooks using only methods and materials available in DaVinci’s time. Upon entering the exhibit area we surely did discover a number of highly impressive archaic machines. Unfortunately, documentation was scant and I had difficulty trying to understand (much less explain to Z) what we were seeing or what significance it had. Even the famed flying machine itself (the very cornerstone of the exhibit) had only a few paragraphs discussing what it was.

Should you plan on attending the exhibit I highly recommend going at a time when you can join in on one of the free tours. We didn’t take one, but did manage to catch the tail end and the tour guide seemed both informative and friendly.

Our day was not yet done, however. Heading for the carnival, Zaira was quick to locate one of her personal heroines, Belle from Beauty and the Beast, painted into a window of the Carnival’s fun house. Unlike previous years Butler Amusements brought a full crew to Christmas in the Park this time with roughly a dozen different rides, a handful of carnival games, and even a souvenir photo booth!

We took a quick tour of the carnival (split between Park, Fairmont Plaza, and the Rep’s courtyard), stopped by the ticket booth, and Z headed straight to their Tilt-A-Whirl which was called Hot Wheels (though no miniature cars were in evidence). Our ‘tour’ required us to cut through Christmas In The Park (which Z had visited with her mother and brothers the night before) where we did pause momentarily for me to don some appropriate Christmas attire (pictured left 😉 ). We also stopped by one of the game booths and I managed to “Ring A Duck” and win a new Christmas puppy friend for Z. Her name is Joy and she’s now integrated herself into the horde that lives ‘upstairs’ on Zaira’s bed with a couple dozen other critters from various midways we’ve visited. But while we were waiting for our Sleigh Ride Portraits to be finished she did get a little frisky with the photo booth’s reindeer mascot 🙂

Although I never really shook my lethargy it was surely a satisfying day with many pleasant discoveries, a few educational lessons, and I even got a couple of those wonderful (and rare) laughs that truly warm a father’s heart.

Dec 242008
 
Part of the Wonderful WordPress Wednesdays Series - Previous in series         Next in series

Welcome to the tenth installment of my Wonderful WordPress Wednesday series. Oh, and Merry Christmas Eve to all those celebrating today!

Over the weekend I was moving several websites around (see my Moving Your WordPress Blog To A New Server In 10 Easy Steps for a walkthru on this process) and discovered that one of my (seldom used) blogs had a database file that was too large to import using phpMyAdmin at my web host. It was just under four megabytes, so easily within their 51MB limit, but still, it kept timing out. Now, WiredTree (my webhost) is very accommodating and I’m sure if I had contacted support they would have gladly (and easily) imported the file for me. However, I knew there had to be a solution and I wanted to figure this one out on my own. Well, on my own with Google’s help, of course 😉

The first “solution” I came across was to use a program called MySQLDumper which I dutifully downloaded, unzipped, uploaded and accessed only to discover that in order for it to work I would need to actually create the backup in MySQLDumper.  Well, I wasn’t interested in a solution that would require me to install a program multiple times on multiple servers run by multiple webhosts, so I deleted that bad boy and kept looking.

Next I found the simple and elegant solution: BigDump by Alexey Ozerov.  BigDump is a single php file that you download from Alexey’s site.  You then change a few paramaters within the file, upload it and your backup, and voila!  You’re all set.  Here’s what I did, step by step…

  1. Visit the BigDump: Staggered MySQL Dump Importer page and download the file.  I used ver. 0.29b (beta)
  2. Unzip BigDump.zip and open the file (BigDump.php) in a text editor.
  3. Modify the following lines to match your database and backup-
    • Line 40 – $db_server   = ‘localhost’;
    • Line 41 – $db_name     = ”;
    • Line 42 – $db_username = ”;
    • Line 43 – $db_password = ”;
    • Line 47 – $filename         = ”;     // Specify the dump filename to suppress the file selection dialog
    • Line 67 – $db_connection_charset = ”;
  4. Upload the modified BigDump.php and your SQL backup file to the webhost where the new database is located
  5. Visit http://www.YOUR-DOMAIN.com/BigDump.php
  6. Click “Start Import”
  7. IMPORTANT: When the script has successfully run, delete bigdump.php and your dump files from your server.

A couple of notes…

  • BigDump has the charset defaulted to ‘latin1’ while most phpMyAdmin’s I’ve encountered have it set to utf8, so make sure you set this correctly.
  • When creating your backup file make sure to uncheck ‘Extended Inserts’ as BigDump isn’t able to split such SQL queries.  This will make your backup (or dump) file much larger (mine almost doubled from just under four megs to just over 7 megs), but will allow BigDump to install it smoothly.

There ya go!  No more worries about moving large databases.  Not only did it handle my 4MB to 7MB blog backup easily, but it imported my 120MB+ forum database dump just as smoothly.  To give you some idea of the size of the forum database I have the fastest DSL connection available to homes and it took more than 25 minutes just to upload the sql backup file.  But it only took BigDump around 7 minutes to successfully install it – something that phpMyAdmin was simply not created to handle.  Man, I just loves me some freeware 🙂

Until next time, if you have any questions, thoughts, or concerns, please comment below and remember that giving this article a Thumbs Up with StumbleUpon will up your karma quotient for the day 😉

Part of the Wonderful WordPress Wednesdays Series - Previous in series        Next in series
Dec 222008
 
Part of the Ask An Anarchist Series -         Next in series

For some time now, I’ve been considering starting a series of posts answering questions that I’m often asked as an anarchist.  Kind of an Applied Anarchy FAQ, or a “How To Guide” for living free.  Tonight I got a phone call that lead directly into this series…

Q) Would you lie or cheat to get out of a parking ticket?

A) No.  Of course not because lieing and cheating are wrong, plain and simple.

The Situation-

My ex got a parking ticket at San Jose’s Christmas In The Park because her bumper was “several inches” into a loading zone.  A friend told her to back the car up so that it was legally parked, take a photo, and submit that as proof that she was, in fact, legally parked.  When she balked the friend suggested that I would do so (assuming the kids were not around to winess the poor life lesson) because as an anarchist I don’t respect the laws anyway.

He’s right that I think the laws are ridiculous, but I don’t believe any principled person should lie or cheat regardless of the situation.  As an anarchist I would have two choices: ignore the ticket completely or go to court and fight it on the basis that the law is unjust oppression of my rights as a sovereign human being.  I, most likely, would follow the former course, but I have promised Zaira that I would stay out of jail until she’s an adult, and, ultimately, ignoring the ticket would end with me in jail because violent kidnapping is the only option the government has to enforce its will on the populace.  Given my promise, I would pay the ticket.  However, in the past, prior to having a child to care for on a regular basis I not only would, but have merely refused to pay tickets and, when violently dragged into court, argued that the law was unjust.  Of course, that always ended in jail time.

Which is why I’m moving to New Hampshire where I will have fellow freedom lovers to stand alongside me when I refuse the tyrannical government’s edicts.  But that’s too much to go into in this post.

As an anarchist I believe that people are capable of governing themselves.  But with this freedom comes responsibility.  The only way a truly free society will ever prosper is if the people that populate it follow a moral/ethical code and take personal responsibility for their actions.  Lying, cheating, and faking evidence is not taking personal responsibility.  It is, as the friend readily acknowledged, weaseling out of ones responsibilities in order to save a few bucks.  That is not at all what anarchy is about.

Part of the Ask An Anarchist Series -        Next in series
Dec 172008
 
Part of the Wonderful WordPress Wednesdays Series - Previous in series         Next in series

Welcome to the ninth installment of my Wonderful WordPress Wednesday series.

NOTE: Although the main focus of this week’s tutorial is sponsored blog posts, there are many, many uses for what I’ll be sharing with y’all today so don’t run off just yet. After the tutorial I’ll share some other great uses for today’s lesson.

Anyone who has ever taken a sponsored post through any of the ‘paid to blog’ companies knows that they’re all full of various rules restricting how you can lay out your blog. Anyone who has taken sponsored posts for more than a few months has no doubt run into frustrations at what seems to be the usurping of your blog by these companies. Well, I’ve finally found a simple and elegant solution – separate templates for individual blog posts.

To see what I mean click over to my latest post at Gilroy Review about how columnist Cynthia Walker hates poor people.  Scroll down and take a look at the entire layout of that post.  Then click on the navigation to go to the post before it on Mary Jane Goods.  Notice anything different?  The ad placements are totally different because one is a sponsored post while the other is not. (BTW, if you’re reading this Google, the sponsored links are all nofollowed so don’t get your servers in a bunch).

All I had to do to accomplish those entirely different post layouts was tell my blog that a different author wrote each post.  I use author because I’m the only person writing on these blogs and my blog themes don’t mention author names anyway.  I could do the same thing with a specific tag or category as well.  I only use author because it’s completely transparent on my blogs.  Now, this did take a little set-up which is what I’m going to layout for y’all here in this post.

I learned how to do this, BTW, thanks to a great post by Justin Tadlock on his terrific Life, Blogging & WordPress blog.  That post contains a lot of code because it covers so many options, and all of that code can be pretty intimidating to people who aren’t used to messing about ‘under the hood’ of their WordPress installation.  So I’m going to stick to one simple system here.  If you want to change templates based on something besides the author of the post then please visit Justin’s site and you should be able to follow along just fine after seeing how easy it is here.

How It’s Done-

Enough blathering.  On to the tutorial itself…

First you’ll need to visit Appearance > Editor within your WordPress Admin and select your Single Post (single.php) file.  Select the everything in the text box there (either drag your cursor over all of it or simply click in the box and hit CTRL-A) and then paste it into your favorite text editor.  Personally I use EditPad, but Notepad works just as well in this case and is available on every Windows computer.

This is the basic template file that determines the layout of the single post pages on your blog. It’s probably already setup in an ‘advertiser friendly’ manner so you’re going to leave this copy alone.

Now return to your WordPress admin, go to Users > Add New and make a new user that you’ll only use for your sponsored posts (or whatever pots you want to use the old template for).  By the way, if you want the author to display the same as your current account on your blog just include the same name in the Nickname box and select that name in the “Display name publicly as” drop down menu.  Ok, once that user is made click on them to go to their edit page and look at the URL in your address bar.  Roughly in the middle you should see something along the lines of "?user_id=4". That number is the key to our next step. Return to your text editor program and save the file as single-author-?.php, replacing the ? with the number you saw in the URL above. Pretty easy so far, right?

Okay, now you just need to open your FTP program and connect to your server. Navigate to Your Blog > wp-content > themes > Your Theme and make a new folder or directory there called single. Then upload your newly saved file to that folder/directory. It should end up looking something like my FTP directory to the right.

That was the hardest part, I promise.  Now you just need to return to your WordPress admin area again and go to Appearance > Editor but this time select Theme Functions (functions.php). Each of these is going to look a little bit different depending on what theme you’re using, but you don’t need to worry about that. Just scroll down to the very bottom where you’ll see ?> and place your cursor on the blank line above that one. Then paste the following into the file and hit Update File-

/**
* Define a constant path to our single template folder
*/
define(SINGLE_PATH, TEMPLATEPATH . '/single');

/**
* Filter the single_template with our custom function
*/
add_filter('single_template', 'my_single_template');

/**
* Single template function which will choose our template
*/
function my_single_template($single) {
	global $wp_query, $post;

/**
	* Checks for single template by author
	* Check by user nicename and ID
	*/
	$curauth = get_userdata($wp_query->post->post_author);

	if(file_exists(SINGLE_PATH . '/single-author-' . $curauth->user_nicename . '.php'))
		return SINGLE_PATH . '/single-author-' . $curauth->user_nicename . '.php';

	elseif(file_exists(SINGLE_PATH . '/single-author-' . $curauth->ID . '.php'))
		return SINGLE_PATH  . '/single-author-' . $curauth->ID . '.php';

/**
	* Checks for default single post files within the single folder
	*/
	if(file_exists(SINGLE_PATH . '/single.php'))
		return SINGLE_PATH . '/single.php';

	elseif(file_exists(SINGLE_PATH . '/default.php'))
		return SINGLE_PATH . '/default.php';

	return $single;

}

Now just go back to your Single Post (single.php) file and make whatever changes you want to your single post layout – ad layouts, styles, backgrounds, etc – without having to worry about the opinions of the sponsored blog companies you work for. Just make sure to select that other (fictitious) author whenever you do a paid post and theirs will appear on a page that meets all of their requirements.

Personally, I also plan on using this when setting up a Daddy-Daughter blog with Zaira in the near future to give my posts a black & white color scheme and hers a pink & black scheme. This system would also be perfect for when you have guest bloggers and it can also be used to differentiate between categories or subjects on your blog rather easily. For example, if you have a weekly photo feature as many do, or host a blog carnival you could use an entirely different template for those posts. As I mentioned above, if you want to differentiate by category or tag just visit  Justin Tadlock’s original post on the concept at his Life, Blogging & WordPress.

I’m sure there are plenty of other uses for this as well, so if you’ve got any ideas, please leave a comment and let me know!  Or, if you have any questions or problems, just leave a note and, as always, I’l ldo my best to help.!

Part of the Wonderful WordPress Wednesdays Series - Previous in series        Next in series