Mostly about my amusement

Category: Cool (page 4 of 11)

WordPress actions and filters are still very cool

I spend time perusing the WordPress support forums (now that’s an understatement) and sometimes I come across someone being unhappy with a plugin. In this particular case a plugin was adding a notice to the admin screens saying “Upgrade now for only $24”.

I really have nothing against plugin authors deriving income that way but I prefer that messages like that in my WordPress dashboard be dismissible. That dashboard real estate is mine and I just don’t like to share.

The plugin adds that message using this code.

add_action( 'admin_notices', 'emg_upgradepro_message' );

WordPress actions and filters are a wonderful thing. It’s a queuing mechanism meaning that the order that your PHP code loads or is executed does not matter. What matters is that actions (or filters) get added to the queue and executed in priority order.

That add_action() does not have a priority so it defaults to 10. Actions that are added that way can be removed too but you have to have that remove_action() in the queue after the action is added. You can’t remove it before it’s added.

I was able to easily (took me 3 minutes) by creating another plugin that just removes that action like so.

<?php
/*
Plugin Name: Remove Easy Media Gallery Upgrade Notice
Version: 0.1
Description: This plugin removes the Easy Media Gallery Upgrade notice in the WordPress dashboard.
Author: Jan Dembowski
Author URI: http://blog.dembowski.net/
*/

add_action( 'admin_init', 'mh_no_upgrade' , 15 );
function mh_no_upgrade () {
        remove_action( 'admin_notices', 'emg_upgradepro_message' );
}

And that’s it. The priority 15 should make it run after the action that adds that message and it does: the message is gone. This may not be the best way to do it but it’s an easy 3 minute fix.

Keep in mind that I don’t use this plugin on my main blog but exercises like this one just show how easy it is to extend WordPress.

“By the end of the war it was deemed inadequate”

Today we went to a nearby shopping outlet (I got sandals) and they had a section for the Museum of American Armor. This is an off shoot of the American Airpower Museum which the kids and I visit a lot.

My 11 year old son is a WWII armor vehicle buff. He looked at a vehicle labeled the M-8 Greyhound and started explaining that the placard said wasn’t for that vehicle. That vehicle on display was the British Bren Carrier.

This impressed the museum guide and when he got to the 57mm anti-tank canon my son replied like so.

Yes, but by the end of the war it was deemed inadequate. The 57mm anti-tank canon was adequate for fighting earlier German tanks like the Panzer I, II, and III. The Panther had thick sloped armor that shells would bounce off. They got the idea from the Russian T-34/76 tank.

Seriously, he said that. I just asked him to repeat it in case I got it wrong.

He’s been reading and has a few books on the topic and for the last couple of years has become an expert.

The museum guide was wowed and suggested that he should sign up to give tours. I think that’s a great idea and it would really build a lot of confidence for him. Hopefully next spring the museum will break ground in Bethpage and we’ll visit them regularly. In the meanwhile we’ll see the armor on display at the American Airpowered Museum this Labor Day weekend.

Advice for aspiring R/C backyard bashers

There are two types of people who play with R/C cars: serious racers and backyard bashers.

Racers are the one’s who start with an RTR or build-it-yourself kit and commence to customize their car for better acceleration, traction, and overall performance. They assemble their own tires, balance the wheels (on a 1/10 scale car!) tune the suspension, select and break in the motor etc.

Racers are hardcore R/C car enthusiasts. I don’t know any racers.

Backyard bashers are everyone else. Me and the kids are into bashing meaning we race around, jump of home made ramps and we break things. Here’s some tips.

Do your research and start with RTR kits

RTR kits stand for Ready-To-Race or Ready-To-Run depending on who you asked.

My brother got a couple of Traxxas Nitro cars but I decided that I wanted electric and shopped around for a good Kyosho model. My last R/C car was a Kyosho Ultima and I thought they’d have something for me.

That was a wake up call. Kyosho is a fine R/C car manufacturer but no one in Long Island sells them. So I went to look at blogs for inspiration and made my way to Jang’s UltimateRC YouTube channel and forums.

Jang’s reviews are really good. He covers what he likes and dislikes as well as does a durability montage. It was his Bandit XL-5 review that convinced me that the kids could handle getting one. We upgraded to the VXL LiPO version and the kids are having a blast.

Thanks to those YouTube videos I got a good idea that Traxxas is just right for durability.

If you do go electric stick with 7.4v LiPO batteries

My R/C car is a Traxxas Rustler VXL and the kids have a Bandit VXL each. They each came with a Traxxas 3300mah 7.4v 2s 25c battery. I wanted another battery so I took the advice of one of the hobby store guys (they’re very cool) and got a Venom 35C 3S 5000mAh 11.1v LiPO battery. Yay! More current! More voltage! The car goes noticeably faster!

It also doesn’t last as long. Using the 3300mah batteries I get about 20 minutes of run time. With the bigger 5000mah pack I get about 15. Going forward I may get a high capacity 7.4v battery but unless I’m racing (and I never will) I’ll stick with more play time versus more speed and power.

LiPO batteries are scary

OK they’re not really scary but the do have some risks especially if you puncture them: these batteries can catch fire. That’s if you abuse them; if you treat them as they should be handled then you will be fine.

This is the reason the kids cannot charge these batteries. When they get them to plugin into their cars I make sure to supervise them. They know to treat the batteries with respect and handle them carefully.

I haven’t yet but I am getting a LiPO charging bag as well as a fireproof box for storing them. I don’t really think I need that but A) you never know and B) parents need to set good safe examples for kids. Safety is not a game.

Visit and make friends with your local R/C dealer

You are going to break R/C car parts. Yes, you can get any of those parts online but getting them locally is faster and you’re local shop will take care of you.

I live near a shop called Elwood Hobbies and they’ve got parts, tools, kits, everything. I could probably rebuild my entire car just from the parts they already have in stock. If they do not have anything they’ll get it. They also service vehicles from big 1/8 scale nitro cars to R/C helicopters. They really know what they are doing and prevented me from making a few boneheaded mistakes already.

Find your local shop and get to know them. They’ll have parts plus advice and you’ll be glad you did.

Expect to buy upgrades

A not very sensitive friend of mine visited while I was replacing stub axle carriers on my son’s Bandit. My son broke them and I replaced them with aluminum versions. He summed up his thoughts concisely.

“Wow, what a scam! And the lexan shell uses cancer causing paint too???”

He’s like that. We all still like him anyway.

What he was referring to is that when I break things I upgrade to the anodized aluminum parts if I can. I didn’t just buy R/C cars (Lily is a very tolerant woman) I also had planned to maintain these cars.

This is not an inexpensive hobby. I limit the amount I spend simply by buying from a durable manufacturer. Our R/C cars will not win any races but high speed 10 foot jumps are usually alright.

Even if you destroy them it’s all good fun

This is a hobby and you may eventually ruin your toy. I mean R/C car. It’s happened to my brother and sort of happened to me in the past.

That’s fine and this hobby is all about fast, fun, and more fun. The kids and went to a parking lot nearby and had had hundreds of feet to zip around in all directions. It was great! And we broke all three of are cars in minor ways.

Using the tools that came with our cars (another upgrade coming soon) I was able to get 2 of the cars working for a while longer. But if the kids and I had wrecked them then we’d be upset but it would be alright. These little rockets move around 30 miles per hour and you can’t change physics.

I’m having a little unique fun with my kids. Even my daughter likes her customized R/C car (although I do wonder how much of this is just about competing with her brother). They’re learning to take care of their expensive toys and I’m learning to be more patient and tolerant of our mistakes. That experience alone makes me recommend these to any Dad.

I’ve become the kid’s R/C mechanic

For Father’s Day I celebrated by getting both kids an R/C car for their own. Since then they’ve broken pieces and we’ve visited the local hobby shop many times.

This is not a bad thing and it was all good clean fun.

When they break I’ve been showing the kids how to take apart different components of their cars. On the simple side they’ve installed wheelie bars and bumpers. On the more complicated side I’ve replaced the steering blocks and stub axle carriers with aluminum versions.

But the thing that I’m most pleased with is that my daughter asked me to get her a pink body for her R/C car. They don’t make them pink so I’d gotten a ProGraphix Bandit body, a can Tamiya florescent pink paint and  Pactra white paint.

I put many coats on the underside of the Tamiya paint and once it dried I then backed it with mores layers from the Pactra white paint. The Tamiya paint went on thin and clear; I always have problems with Tamiya paints. I’ve used their acrylic spray paint for my Gundam models and it just pools easily and goes on thin.

The Pactra paint was fantastic and next time I’m sticking with just that brand. It applies in good even coats and doesn’t run.

The end result was worth it.

you-go-rc-girl

I only take credit for the color, the lines and pattern came from the factory. It still looks awesome.

She really likes it and for a while today she was very hesitant to play with it. But I explained that these were meant to be used and I can always get a replacement body. She was back to crashing in very little time! Good fun.

I have a similar photo of my son with his blue version (blue stock body from the factory) but he looked like he was swallowing a lemon so I’ll post a different photo some other time.

We need to go to a parking lot more often. The three of use zipping up and down my narrow street has resulted in some interesting crashes. My son is at the moment is the best driver out of us but I expect the girl to give him a run for his money real soon now.

Oh and being the kid’s R/C mechanic? It’s a great job and I think they may continue to give me their business. 😉

Having hobbies is a good thing

Anyone who’s even given my blog a quick look can see that I’m all about my amusements. For the longest time that has been photography. I still love taking and sharing photos but lately I’ve been consumed with a new old hobby.

Radio controlled 1/10 scale cars! Vroom VROOM BABY!

Ahem. I’d first gotten into the hobby in college more than 20 years ago (what???) with a Kyosho Ultima, which I quickly wrecked by t-boning a concrete wall. The chassis was bent in a U shape but I was able to recover most of the parts and put them on a replacement carbon fiber chassis with a new Lexan body.

That was 1987 or so. It’s always been an expensive hobby. I think I was working at a White Castle when I bought that kit.

Now move up to 2013. Stefan recently got hold of a Traxxas Nitro Rustler (a modern 1/10 nitro powered truggy) and since I have a large back yard I got to play with it and had a great time. So I dug out my old R/C car and borrowed  an old Futaba controller.

ultima

More than 20 years later it worked! But not too well. A lot of things changed in the hobby in that time. Un-assembled kits are more expensive and all the big R/C car companies are selling Ready-to-Run kits that you just charge the battery and go. The batteries and ESC improved along with the motors.

Those little monsters take off like a rocket. After some healthy rationalization thoughtful consideration Lily and I went to a hobby shop and picked up the electric version of the one Stefan has. His is red, mine is silver.

It’s still an expensive and addictive hobby. This morning I took the Dremel and cut slots so that I can Velcro strap down the battery. In the weeks that I’ve been playing with it I’ve replaced the front broken caster blocks with aluminium ones as well as the stock tires with Pro-line Dirt Hawgs. Add a new Lexan body (I scratched and put holes in the original and have to paint this one) and it’s beginning to add up.

The kids (yes, my daughter too) and I love it though and that’s the point of all this really. You have to have something that you like to do outside of what you do for a living.

That’s not a hard rule of course. I like and have lots of fun at work and I’m part of a good team. But it’s work and you have to take that seriously even if you enjoy it.

Playing with the kids and spending time on these toys has no consequences other than possibly wasting my time and money. They thinks it’s cool and just zipping up and down the street can be great fun.

Here’s a YouTube video of just that. 🙂

That’s why I’ll continue to find new things all the time to get into. It’s really all about my amusement.

Crayons! And Dragons!

Crayons and imagination, what else do you need? Oh yeah, a dragon really helps too.

This cool animation is a double bonus as my little girl loves to draw and make things.

The boy? He’s currently into WW II tanks, planes, submarines… You get the idea. 🙂

Thanks to the Mary Sue for posting this.

Get Your Tin Foil Hats Right Here!

Update: Sometimes I DO over think a problem and a solution. Which is odd because SSL is also one of my (supposedly!) strong points. Skip to the comments below for something that Andrew Nacin pointed out. 😀

——————————–

Part of my professional life is to think about topics like data leakage. That’s when you do something and, without realizing it, you transmit information that you hadn’t intended to.

For example, my company may have an internal web page with this URL:

And on that page is a link to a NY Times DealBook blog posting as a reference. One of the readers in my company clicks on that link without hesitation. Why wouldn’t they click? That’s what the link is there for.

When Dealbook processes their web access logs, they’ll see a URL as the HTTP referer (I’m spelling it correctly after this) that the company or person who clicked that link may not want them to see.

How to prevent sensitive referrers from being sent from your WordPress blog?

  1. Install and configure YOURLS (svn revision 703). Get that working with a short domain, it’s easy to do.
  2. Install and activate my short Force Javascript Redirection YOURLS plugin. [download id=”1″]The useful bit is only one line.
  3. Install my WordPress Convert Links to Yourls plugin but don’t activate it yet.[download id=”3″]
  4. Modify two lines in that WordPress plugin for your  configuration. Sorry, I’m not up to making an options page (yet).
  5. Active that WordPress plugin.

And poof! the Tin Foil Hat is in place. Any links in your post content or comment text will have their links sent to your very own link shortner and the remote site will only see the short link as the referrer.

Read on to see how it works. Read more