Posted by & filed under Coding.

Needed a way to practice a bit for the CCNA exam that I’m planning on taking within the next few months. I’ve found a bunch of multiple choice banks to cover a lot of the memorization, but was looking for a way to practice more with network addressing. Sure, there are some multiple choice banks out there. But real-world isn’t multiple choice, so I wanted a better way.

Spent about a day dug into bits and JavaScript and came up with network-practice.info. It lets you get random questions for binary to decimal conversions, decimal to binary, and network addressing either using classes or CIDR.

An obligatory screen capture. Nothing exciting, but here it is anyway.

There are 4 types of questions and you can pick which types you want. And since the questions are built randomly with a bit of JavaScript, you can try as many questions as you like. When you’re finished, click the done button and you’ll get stats on how you did on each of the types.

Posted by & filed under WordPress.

Had to do a quick update for my Plain Text Custom Post Type WordPress plugin.

Right now I’m only using it one site, and I’ve never noticed a problem until this week. The JavaScript wasn’t working from another computer. Turns out it was conflicting with the stats module in Jetpack. Jetpack inserts a bit of code in either wp_footer or the shutdown action to do the tracking. It never was an issue with me because Jetpack doesn’t insert that code when logged in. Wasn’t logged in on the other computer and that’s when the conflict showed up for me.

So a quick remove_action to get the Jetpack action out of shutdown on the plain text posts and it appears to be working without a hitch now.

New version is up at the WordPress Plugin Site.

Posted by & filed under Tweets.

• Love this RT @alfredtwo All my problems could be solved with money. In other words I have mostly small problems. I think I'm lucky that way. #

Posted by & filed under Tweets.

Posted by & filed under Tweets.

• Algorithm to improve on standard A/B testing, and it's only 20 lines! http://t.co/QoyZkfw2 #
• How did I miss this? Ctrl-/ in #netbeans will comment out the current line. #

Posted by & filed under Tweets.

Posted by & filed under Computers & Internet.

A few months ago I setup an Oracle VirtualBox on my main computer to act as a web server to develop against without needing a separate machine. Took until yesterday to figure out how to get the bridged networking option working with other machines on the network though. Short answer, I had originally set it up as a host only network and put the name in my hosts file and that conflicted once I switched to bridged. More to it than that, but probably should be its own post.

The reason for the switch was so that I could have the VM on my network and use any computer to connect instead of just my desktop. Worked fine, except for my MacBook.

I was able to ping both ways, traceroute looked fine, and I could view web pages via the Apache web server on the VM. The network connection was good.

Problem was that the VM wouldn’t accept my password when I tried to connect from the Mac. Vista machines were fine. Just not the Mac.

After too much time spent searching I did what I should have done first and looked at the console logs on the notebook. And plain as day was the problem. Snow Leopard didn’t like sending the passwords in plain text.

One switch on the Samba side to require encrypted passwords and it’s working perfectly.

Posted by & filed under Tweets.

• Nice add in @Netbeans 7.2 – Search in single project even when multiple projects are open instead of all open. Always been on my wish list. #

Posted by & filed under WordPress.

Love the MathJax plugin for WordPress. Makes it really easy to insert equations, assuming you’re somewhat familiar with Latex formatting.

Problem is, there is always no space below the equation. I’ve been just hitting enter a couple of times after the closing latex tag, but I wanted a better solution.

Since there’s a syntax attribute as part of the latex tag, I decided to add my own. If I set syntax to block, the plugin now wraps the equation in a div that has a bottom margin of 32px.

function latex_shortcode($atts,$content)  {
self::$add_script = true; //this gives us an optional "syntax" attribute, which defaults to "inline", but can also be "display" extract(shortcode_atts(array( 'syntax' => get_option('latex_syntax'), ),$atts));
if ($syntax == 'inline') { return "$$" . content . "$$"; } else if ($syntax == 'block') {
return "<div style=\"margin-bottom:32px;\">$$" . content . "$$</div>";
}
else if ($syntax == 'display') { return "<div style=\"margin-bottom:32px;\">$" . content . "$</div>"; } } I changed the latex_shortcode function a bit. Added another check for$syntax == ‘block’, and if true then wrap the output in a div. Also use the same div settings for the display syntax, although I don’t really like the display syntax because it centers the equation.