Mysterious “btst” DIV hack on this site…FOUND

This is fun, right?

For a long time, I’ve had a hidden (actually just aligned 4000+ pixels off to the left) DIV at the top of every page of this site that included links to websites I have no interest in. I did not put the DIV there. I did not want the DIV there. For a year or two, I have been wanting to kill that DIV but could not figure out how.

Ah, the joys of shared hosting.

Well, this morning I found the code that was causing the problem and I got rid of it. If you’re in a similar situation and have a similar DIV at the top of every page of your [expletive deleted] WordPress site, the following info may help. Note that my situation may not completely match yours so I can not guarantee this will solve your problem. My site’s DIV was immediately followed by an HTML comment that looked like the following comment, in case it helps match my situation to yours:

<!-- btst -->

The code that was causing this DIV to be added was hidden in a BASE 64 encoded string that was being decoded and “eval’ed” in the wp-config.php file in the root directory of my site. The line looked like this (I’m editing the encoded gibberish because I don’t want to share anything useful beyond the appearance of the text):


The line was immediately after the ob_start() command. I deleted it with extreme prejudice.

Voila, no more DIV at the top each page.

I’ll note here that the wp-config.php file was set to mode 644 so only I, the owner, had write permission on the file. This tells me that something within WordPress may have added the nefarious code. I guess I’ll know in a few days because the lines will return to wp-config.php. If so, screw it, I’ll do what I’ve been threatening for years and dump WordPress for good.

Posted in WordPress | Leave a comment

Building YouCompleteMe on Vim 7.4 in Ubuntu Trusty (32 bit)

Oh, how I love documentation for open source software. In some cases it’ll get you close, or at least close enough to take things the remaining 2% of the way to completion. However, far too often it barely gets you off the ground.

YouCompleteMe is a great code-completion bundle for Vim. When it’s installed and configured and running it’s so amazing that you’ll question many of the reasons you use an IDE for development.

That said, getting the damn thing installed on a 32 bit version of Ubuntu “Trusty” will make you want to climb a tower with a high-power rifle. Continue reading

Posted in Vim | Leave a comment

Observations: Getting started with TI Launchpad (MSP430)

This will be more of a collector of observations and notes than anything actually useful or productive. I want to document these things so I’ll remember them. They may even be useful outside of my office. Who knows?

Regardless, here we go… Continue reading

Posted in Launchpad, msp430 | Leave a comment

About getting started with AVR programming

Like one post by a guy like me could possibly encompass everything you’d need to know. Pshaw. Continue reading

Posted in Arduino, AVR, hardware | Leave a comment

Nokia 1260 (or 3360) display and Arduino/AVR? Maybe. Not yet.

I’m going to make a confession. My favorite mobile phone of all time is the Nokia 1260. Nope, not an iPhone, not an Android phone, not even a smartphone. Sorry folks, but the telephone hardware in smartphones sucks all the way across the board. WORST. PHONES. EVER. Why even include the hardware? Screw it, just make smartphones pocket robots and be done with it. I digress.

This little pre-paid AT&T mobile phone was fast, cheap, rock solid, and had all the features I’d ever need in a phone plus about 20. AndandAND…it’s absolutely worthless in 2014. Oh well, I guess phones aren’t in style anymore.

Seeing as how there is no resale value in this thing anymore and I have no intention of moving from my iPhone back to a pre-paid mobile plan, I may as well crack this thing open and salvage parts for DIY projects.

Continue reading

Posted in hardware | Leave a comment

Kenwood RC-405 remote control meets an Arduino Uno

Show of hands: how many of you think remote controls for car stereos are ridiculous?

Okay, maybe I’m the only one. Regardless, I have one and there’s no way in hell I’m ever going to use it in or around my car, so I may as well put it to good use elsewhere.

Like, maybe to control an Arduino? Sure, why not.

Continue reading

Posted in hardware | Leave a comment

Dying in a college math class? You need a better textbook.

So at this point, anyone that reads this blog knows I’m taking computer science classes at a local university. One of my ongoing beefs with * science majors is the (IMO) ridiculous amount of math classes that everyone has to take. In the case of computer science, I swear there are more math classes than there are actual computer/programming classes. It’s nuts.

Last summer I stumbled my way through a pre-calculus class (yeah, I didn’t need to go far with math when I got my BFA) and managed to get an A. I didn’t get an A because the professor was awesome (she was cool but I had a hard time learning from her), nor did I get an A because of the textbook. In fact, I got an A in spite of the textbook–what a utter and complete piece of kunk–and in spite of difficulties learning from my professor. My A was punk through and through. Buck the system, and all that.

I could wax philosophic about college math departments, but I’ll save my conspiracy theories for private conversations. Suffice it to say I think they do not all have your best interests in mind when they (a) choose their textbooks, (b) hire their professors, and (c) teach you math.

In my case, a double-whammy of difficult teacher + horrific textbook drove me to Kahn Academy and other free resources on the Internet. That worked for me, but I still wish my pre-calc class required less hunting. I wish I had a resource right here in my basement office that I could pull off a shelf and read instead of my assigned math textbook.

Turns out I could have done that all along. Oh, the things you don’t think about when stressing over functions.

I checked out other colleges near me and found one textbook that got consistently good reviews from students. It’s called College Algebra and Trigonometry through Modeling and Visualization (2nd Edition) by Gary Rockswold. It’s at least two editions behind the most recent edition, but the beauty of math is that it doesn’t change. The pre-calc you’re learning now is the same pre-calc that existed before Isaac Newton defined calculus. On top of that, when a textbook edition is two or more editions old, it’s dirt cheap. This book was about $150 new, but I got it through for $1.50. Note the decimal position. With expediting shipping, I paid $7. I win.

Long story longer: if your college math textbook sucks, get a better one. It’s cheap and you’ll do better in math in spite of your college’s efforts to knock you down. Bastards.

Posted in school | Leave a comment

The Affordable Care Act. Yeah, that.

Okay, I’m going to get political here for a minute. Don’t want to read it? Don’t worry, just skip it.

Continue reading

Posted in opinion | Leave a comment

Bluetooth, FreeBSD 9.1, MacBook

In another post, I described how I got FreeBSD 9.1 running on my EOL’d 1st generation MacBook. It was quite a mouthful so I decided to put bluetooth setup instructions in their own post.

Continue reading

Posted in freebsd, hardware, macbook | 1 Comment

FreeBSD 9.1 by itself on a 1st gen MacBook

Apple thinks this laptop is obsolete. I think Apple gave up on it too soon.

If you’re like me and you felt “stuck” with an orphaned 1st generation MacBook, it’s time to get unstuck. If you can give up on the idea of running a solid installation of Mac OS (Snow Leopard is as new as it gets, and at 32 bits, it’s losing applications by the hour), a bright and only slightly labor-intensive future awaits with freely available flavors of *NIX.

Continue reading

Posted in freebsd, hardware, macbook | 2 Comments