Tech Archives, page 3

All things technology. Very popular here on Justinsomnia.

Hotel Wifi JavaScript Injection

So I’m checking my blog on the hotel wifi, like ya do, and I notice something a little off with the style. There’s a dark colored bar at the top of the page that shouldn’t be there. That’s funny. Maybe a recent Firefox update changed how they treat CSS?

Justinsomnia screenshot showing weird blue bar
Screenshot of Justinsomnia with weird bar circled in red

I probably wouldn’t have thought much of it, except my blog had recently been hacked (someone had gained elevated access to my web hosting account and prepended every single PHP file with a base64 encoded rootkit), so I immediately decided to view the source. Sure enough I saw some unfamiliar CSS and JavaScript that had been injected after the <head> tag (reformatted here for readability):

Continue Reading

Emending an esoteric Exif error

From November 2006 until June 2007 (coinciding with my use of Ubuntu’s Edgy Eft v6.10), there was a bug in the old photo importer (or in Gimp, I’m not sure which) that failed to set the Exif orientation tag to 1 (aka top-left) after rotating a photo. This was solved in the following release of Ubuntu, though the fix was somewhat incomplete—as I wrote about in How to fix Eye of Gnome’s photo orientation in Ubuntu Feisty.

What this means is that the vertical photos I edited in Gimp during that time had an Exif orientation tag indicating that the top-left of the image was something other than the top-left as it appeared when I hit save. The funny thing is that Firefox (to this day) completely ignores this orientation tag. So I had no idea there was a bug lurking in the Exif metadata of the photos on my blog.

Continue Reading

How to set up a local copy of your WordPress blog

WordPress logoWhy might you want to do this?

This is how I managed to keep my blog up to date while I was “on the road” over the last year, even when I didn’t have access to the internet. As long as I had power (which was not always a given), I was able to compose drafts (usually in a text editor), edit photos (in GIMP), and then layout/revise posts (in my local copy of WordPress). When I was ready to publish, and had access to the internet, it was a trivial process of uploading the photos (via SSH), copy-and-pasting the text over, and pressing “Publish”.

In fact I found it so much faster to compose and revise posts locally, that I’ve continued to use this set up even after returning to fast internet connections. Think about how many times you’ve hit that “Save Draft” button and waited for WordPress to “return” so you could reload the post preview tab—and you probably understand what I mean.

The steps I describe are based on my past experience of setting up a local web development environment on my laptop. Of course I ran into a few gotchas along the way, so I documented the process here for future reference. I don’t necessarily recommend this approach for everyone, but I figured it might offer some interesting insight into how I do things.

Continue Reading

Holy QR cupcakes, Batman!

If you happened to catch the recent Duncan Hines “Bake On” commercial, you may have registered a subliminal cupcake crop circle that momentarily materialized before disappearing beneath a giant flying brownie. I’m not making this stuff up. The first time I saw it, my brain didn’t even realize that it had seen a QR Code until after the next commercial started—and by then I had no recollection of what that crazy kaleidoscopic, cupcake-tastic commercial was even advertising. Here are some screenshots from the trippy 30 second spot:

Duncan Hines Bake On commercial screenshot of large flying cupcake
Duncan Hines Bake On commercial screenshot of flying cupcakes
Duncan Hines Bake On commercial screenshot of cupcake QR Code

At first glance, it seemed utterly pointless—flashing a QR Code so fast no one even knows that they’ve seen, let alone has the time to pull out their smartphones. I imagined people on the edge of their couches with iPhones primed, eagerly anticipating that split second when the commercial inevitably airs again. Visions of Orphan Annie’s Secret Society decoder pin danced in my head.

And then I remembered all those DVRs out there. Now assuming folks are not already skipping the commercials, this is actually a pretty neat strategy to get people to stop and take note of an ad, albeit one with a pretty high technical barrier to entry.

So where does the QR Code go? Well, that depends. It encodes the URL, which, if you scan (or click) using a desktop web browser, will redirect you to Duncan Hines’ Facebook page. But if you scan with your iPhone (a more likely scenario), you’ll get a little web-based mobile site with recipes and coupons, including some features that are “locked”, requiring you to “Scan more [cupcake?] QR codes” (leaving no brownie unturned, I’d imagine).

duncan hines bake on commercial qr code 4

Boing Boing’s tribute to Steve Jobs

boing boing tribute to steve jobs screenshot
Screenshot of Boing Boing’s touching tribute to Steve Jobs

Update: also see xkcd’s Eternal Flame