Rochester Duathlon 2017 – Sprint Distance Result

Official Result:

1:44:23 for 2.5K run + 14 miles bike + 5K run

We didn’t have a tracker on this event, so pretty much the total time is the only data I got. No each segment data or transition time. Also due to the weather the bike route got changed (distance changed).

#4 of 7 (right in the middle) for my age group (female only)
#11 of 20 (again right in the middle) for all female
#32 of 43 for all participant

Thoughts:

I think I did good considering…I run all the way (no walk) and I biked faster than my commute mode most of the time.

Need to cut out binge eating before the race…that is don’t eat 4.5 donuts 2 days before the race thinking that’s the only unhealthy food you are gonna eat and you can surely burn that off. Then a day before the race you end up eating a BOX of ice cream sandwiches ( = 12 sandwiches) because…I don’t know because there is a box of them in the freezer. Then you realize the food at the race looks awesome and you can’t stop yourself after the race….because you’re hungry.

I think I gained 5 pounds by doing the race.

Finger Lake Triathlon 2016 – Sprint Distance Result

Official Result:

Total Time: 1:45:56
Place: 207 (out of 353)
Place Female Only: 70 (out of 167)
Place Female Age Group 40-45: 6 (out of 17)
Swim: 16:06 (2:09 100s pace)
Bike: 54:34 (15.28 mile per hour)
Run: 30:20 (9:47 per mile)

Thoughts on the race:

Didn’t have to swim really…99% of the time I was doing dolphin dive because the water was shallow. Nice water temp at 71F. Waiting for the race was the worst part. The wind was pretty strong during the bike ride but I was expecting that…so no surprise there. The cool temp made the running much easier than the practice on Thursday…I think that’s the reason I was able to run under 10 min per mile (for the first time ever!). Need to get myself a pump. My tire was almost flat in the morning….luckily I was able to borrow one from a guy nearby. Need to figure out the best place to put the bike number…I got a bunch of paper cuts on my legs. That was annoying.

Next Goals:

Run – under 9 minutes per mile (next month)
Bike – over 16 miles per hour (next month)
Swim – 100% freestyle (that’s for next year)
Overall – less than 1:40:00 total time, would like to be top half for overall place.
I need to take swimming lessons over the winter. I’d like to squeeze a couple of dives too if I can (I need to find away to pay for all that)

Sodus Point Triathlon 2016 – Sprint Distance Result

Official Result:

Total Time : 2:00:06.92
Overall Place: 153 (out of 172)
All Female: 61 out of (77)
Swim – 23:15 (1.2 mph)
Bike – 1:01:32 (12.8 mph)
Run – 32: 02 (10:20 per mile)

Thoughts:

1) one-piece triathlon suit – hard to go to bathroom. Consider switching to a two-piece
2) good idea to have two sets of replacement tubes and CO2 bottles instead of just one
3) need to focus on race especially when riding a bicycle instead of getting distracted by pretty sceneries and farm animals.
4) do not plan anything after the race…you need a serious nap afterward.
5) if Darth Vader carrying an American flag with a six flag pole and a gas mask on can finish the race, so can you.
6) Bring your own stash of donuts. Healthy events like these provide cut vegetables and fruits, small cookies. My craving for post-race is donuts not fruits.

Keeping cell phone bill under $20

Republic Wireless is introducing SIM based smartphones this months which allows their customers, for the first time, BYOD.

But with this new line of smartphone offering, Republic Wireless also came up with yet another new billing plan that increased the lowest plan from $10 to $15 (With cell network from $20 + unused data refund to $20 with no refund). You can stay on the old plan as long as your device is compatible with the old plan, that is non SIM based smartphones that were sold by Republic Wireless.  But if you are thinking of getting a SIM based smartphone, like I am, staying with the old plan isn’t an option.

So I’ve been researching various phone options as well as alternative service providers. After a bunch of goole searching I narrow them down to:

Device: Moto G 4th Generation from Amazon Prime Exclusive Phone ($140)
Service Provider: RingPlus
Continue reading “Keeping cell phone bill under $20”

When to upgrade T2 instances on AWS – CPU usage

AWS currently offers five levels of T2, Burstable Performance, instances on EC2. T2 instances “provide a base level of CPU performance with the ability to burst above the baseline.”

What’s not obvious from the general documentation page is that what’s the easy indicator to determine if you need to upgrade your T2 instance to the next level.

T2 Instance CPU Baseline Performance

What I found to be the best/quickest way to figure out when to upgrade T2 instance is to look at CPU Utilization (Percent) chart on the monitoring section for the instance. You need to compare the average usage of the CPU and the baseline of the T2 instance (above the baseline means the server is in the “burst” mode which uses the extra CPU credits).

Here are the baseline of each T2 instances:

Instance TypeCPU Baseline Performance
t2.nano5%
t2.micro10%
t2.small20%
t2.medium40%
t2.large60%

CPU Credit Usage and CPU Credit Balance

CPU credit usage chart and CPU credit balance chart are also good indicators. However, when the credit usage is too rapid, you might not be able to catch the issue in time to resolve the performance issue. The decrease in the credit balance is recorded only AFTER the server is performing beyond baseline performance. In other words, it’s not a good PREVENTATIVE indicator.

But Beware…

This is a simple way to measure the performance of the server reflected on CPU usage. There are other resources that causing the issue on your server(s). The most common issue I experience is the depletion of available memory. This happens if I am running a multiple servers (such as LAMP) under one instance. While CPU usage is within a normal range, not too uncommon to run out of available memory and your application stop running properly. I find that t2.nano instance and t2.micro instance aren’t sufficient to run a LAMP in most cases.

Resources: New Low Cost EC2 Instances with Burstable Performance
Resources: EC2 Update – T2.Nano Instances Now Available
Resources: Burstable Performance Instances

jQuery conflict in WordPress 4.5 and WooCommerce 2.5

If your WooCommerce site is having a problem since you upgraded your WordPress to version 4.5, the problem might be associated with jQuery version that came with the new WordPress.

WordPress 4.5 “Coleman” comes with jQuery 1.12.3, the first version 1.12.0+. Previously it was using 1.11.x.

Check to see if your site generates script error(s). My script error after the WordPress upgrade was

 Syntax error, unrecognized expression: a[href*=#]:not([href=#])

I discovered when I wasn’t able to add a variable product to a shopping cart (the product page did not show the product price after all the options are selected, and displayed “please choose options” message)

Solutions

If you haven’t upgraded WordPress 4.5, my recommendation is to hold off the ugprade for now. If you already have upgraded, then you can add the following code to your theme’s functions.php to downgrade jQuery version:

// Downgrade to jQuery given version
function downgrade_jquery() {
  global $wp_scripts;
 
  if ( !is_admin() ) :
    wp_deregister_script('jquery');
    wp_register_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', false, '1.11.3');
  endif;
}
add_action( 'wp_head', downgrade_jquery() );

How to darken post background images in Fable theme 1.7.4

The theme I’m currently using for this site is Fable Theme by Elegant Theme.

One of the issues I recently dealt was how I have to be picky about selecting featured images for each post. The featured image is used as the background image for each post on homepage and archive pages. And by default, when there is an featured image assigned to a post, the font color of the post title and its summary is white.

Initially, I darken the text shadow to make the text more readable. But depending on the image I picked, it wasn’t an effective solution for some posts.

So I decided to apply linear gradient over the post background/featured image to make it little darker to give little more contrast between the text and the image.

Unfortunately, you can’t simply overwrite style.css in this case. The themes uses a function, et_fable_get_background(), to insert background-image property in the section in content.php

So in order to make the change, you need to modify two files in the child theme folder.
Continue reading “How to darken post background images in Fable theme 1.7.4”

A step toward quitting cigarettes

So there, my biggest weakness…smoking. Among many things that I enjoy, smoking is the only thing that I can’t seems to control. I LOVE bacon, but I can go without bacon for days, weeks, or months. I LOVE drinking wines, but I can take a break from any alcohol beverages for months. But cigarettes…not a chance.

Yes, I did the patches, the gum, and the prescriptions…you know the standards. There are times I was able to stop smoking for months…but every time I went back eventually.

The problem is, though I know it is driven by addiction, I can’t stop enjoying smoking. The alternatives were simply NOT enjoyable. It leaves me frustrated and pissed off…and the frustration grows the longer I stay away from smoking. It never got better.

That is until I got introduced the world of vaping about a week ago.

Hello? How come I didn’t get hooked on this sooner?

The biggest thing is I ENJOY vaping. It doesn’t make me frustrated. The day I started vaping is the day I stop smoking cigarettes…well almost (I went for a couple of cigarettes while the battery had to be charged for hours). This is the first alternative method that doesn’t make me miss smoking. I prefer the taste of vapor over cigarettes.

I love the fact that I don’t smell like cigarettes, that my next car won’t be stinky, that I don’t accidentally make a cigarette burn on anything, that cost much less than buying a pack of cigarette at a gas station (after a bit of investment on the equipment but you’ll get that back in time). And I love the fact that I can control the nicotine intake without a waste. So many times, I just want to get little of smoke, not the whole cigarette. I tossed out so many less than half smoked cigarette butts before.

The bottom line is, THIS already allowed me to breakaway from cigarettes with such an ease. I’m hopeful that this will be my permanent goodbye to cigarettes. Yes, it’s only a week so far, but I’m very optimistic this time.

Note: I am not encouraging anyone to start vaping. As far as I know, there is no conclusive research result that show vaping is a better alternative to smoking cigarette or a suitable smoking cessation method. There is no understanding of long-term health effect of vaping either. I STRONGLY discourage people from vaping especially if you are not addicted to smoking already.

How to sort grouped product’s children in WooCommerce 2.5.x

You MUST backup your database and your web files before you try this method.  If you decide to try this method, please do so at your own risk. I will not be responsible for any site breakage.

The order of child products in a group product page in WooCommerce is based on “menu_order” value in ascending order. You can change each product’s menu order value in “Edit Product” page under “Advanced” tab.

The problem is you can’t go through this process when you have hundreds or thousands or products and finish in timely manner.

There are several ways you can do to re-sort your child products in much faster manner.
Continue reading “How to sort grouped product’s children in WooCommerce 2.5.x”

Recreate Cazbah legacy platform’s product table in MySQL

CREATE TABLE products (
productActive bit(1),
productCategoryname varchar(500),
productSku varchar(500),
productName varchar(500),
productLongdesc text,
productPrice  double,
productMSRPActive bit(1),
productMSRPLabel varchar(500),
productMSRPPrice  double,
productMSRPSeparator varchar(500),
productMSRPColor varchar(500),
productWeight double,
productShipprice  double,
productFreeshipping bit(1),
productPic varchar(500),
productPicurl varchar(500),
productPiclink varchar(500),
productSubtitle varchar(500),
productThumbnailPic varchar(500),
productThumbnailurl varchar(500),
productDisplayOrder int,
productTrackInventory bit(1),
productCurrentInventory double,
productVariablePricing bit(1),
variationSku varchar(500),
variationDisplayName varchar(500),
variationInvoiceName varchar(500),
variationPrice double, 
variationMSRPActive bit(1),
variationMSRPLabel varchar(500),
variationMSRPPrice double, 
variationMSRPSeparator varchar(500),
variationMSRPColor varchar(500),
variationWeight double,
variationShipprice double,
variationPicUrl varchar(500),
variationActive bit(1),
variationFreeshipping bit(1),
variationDisplayOrder int,
variationTrackInventory bit(1),
variationCurrentInventory double,
variationVariablePricing bit(1),
questionWording varchar(500),
questionDisplayOrder int,
questionAnswerRequired bit(1),
questionDropDownAnswers bit(1),
questionPriceChange double,
questionLongText text,
answersDisplayName varchar(500),
answersInvoiceName varchar(500),
answersDisplayOrder int,
answersPriceChange double,
googleCategory text,
productGglProdCondition varchar(500),
productGglOnlineOnly bit(1),
productGglGTIN varchar(500),
productGglMPN varchar(500),
productGglBrand varchar(500),
productGglColor varchar(500),
productGglSize varchar(500),
productGglMaterial varchar(500),
productGglPattern varchar(500),
productGglAgeGroup varchar(500),
productGglGender varchar(500),
choiceGglProdCondition varchar(500),
choiceGglVariant bit(1),
choiceGglOnlineOnly bit(1),
choiceGglGTIN varchar(500),
choiceGglMPN varchar(500),
choiceGglBrand varchar(500),
choiceGglColor varchar(500),
choiceGglSize varchar(500),
choiceGglMaterial varchar(500),
choiceGglPattern varchar(500),
choiceGglAgeGroup varchar(500),
choiceGglGender varchar(500)
);