Firefox Miami Style?

Part of run­ning an ac­tu­al serv­er (as op­posed to shared web host­ing) is ac­tu­al­ly be­ing con­cerned about se­cu­ri­ty. I reg­u­lar­ly keep an eye on my ac­cess logs and the like, and I don’t usu­al­ly find that much to wor­ry about — I just keep ipt­a­bles, and a few oth­er tools, with­in reach.

But this par­tic­u­lar user-agent string show up in vis­its from time to time (bots, I’m guess­ing)… what the hell is Firefox Miami Style?

An ex­am­ple: - - [26/Dec/2013:13:34:39 -0500] "POST /wp-login.php/wp-login.php HTTP/1.1" 200 10956 "" "Mozilla/5.0 (Windows NT 6.1; rv:21.0) Gecko/20100101 Firefox/21.0 USA\\Miami Style"

Trying to POST to a nonex­is­tent URL? That’s clas­sic Miami style, if I’ve ever seen it.

Yes, that’s a new laptop. Yes, I know what year it is.

lenovo-thinkpad-x230-frontI know it’s 2013 and as far as “mo­bile com­put­ing” goes, I’m sup­posed to be pinch-zooming and app-buying and poorly-typing on a tablet like the cool kids. And I do — my  O.G. Nexus 7 (the 2012 mod­el) some­times makes a nice com­pan­ion1 to my Galaxy Nexus Android phone, by be­ing slight­ly faster and hav­ing a slight­ly bet­ter screen. However, over the 15 months I’ve owned the Nexus 7, it nev­er quite be­came the sec­ond mo­bile de­vice that I want­ed. Useful, yes… tran­scen­dent, no.

I knew some­thing was still miss­ing, so I re­cent­ly went and bought a small lap­top com­put­er, a Lenovo ThinkPad X230, to car­ry around. It runs Debian Linux. It does the things I want. It’s a won­der­ful thing to have.

I needed this because…

The lap­top that the ThinkPad re­placed was from 2007, and while a de­cent com­put­er from back then would like­ly still be good to­day, my old lap­top was not a de­cent com­put­er, even when new. Back then, I didn’t know just how painful­ly slow an ultra-low-voltage, low clock-speed CPU could be… I guess I thought it be­ing dual-core would some­how make up for it. Also, the cool­ing fan was a bit of a whin­er, and would con­stant­ly and very vo­cal­ly dis­agree with Linux’s style of pow­er man­age­ment. The darned thing would con­stant­ly sound like a mini-jet-engine — too ob­nox­ious to use around peo­ple I ac­tu­al­ly like.

Low on pow­er, high on noise — not a good combo.

But these days…

In the last half-decade or so, main­stream hu­mans seem to have ac­cept­ed the smart­phone, and seem to be do­ing the same for the id­iot cam­era (“tablets”). It’s the “Post-PC era,” or some­thing. Plenty of peo­ple seem to be do­ing okay with­out spend­ing much time on their general-purpose per­son­al com­put­ers, but over time I re­al­ized that as I tried to go along with this trend, I was miss­ing out. For me, a com­put­ing life cen­tered around mo­bile “smart” de­vices was one of un­ac­cept­able com­pro­mise. Composing more than a cou­ple of sen­tences with­out a key­board makes me want to just not both­er to write, de­vices with­out ex­pand­able stor­age make one de­pen­dent on rent-seeking “cloud” ser­vices, and the mo­bile app ecosys­tem has hand­fuls of well-known prob­lems (pri­va­cy, lock-in, and so on).

There’s a place for these de­vices, even in my life, but they just don’t re­place a general-purpose com­put­er. Ever.

So I did this…

I made sure not to make last time’s mis­takes when buy­ing this com­put­er. The i5 CPU is more than ad­e­quate, and I have a ton of RAM. ThinkPads are known to play nice­ly with Linux, be­cause they’re used by that awe­some kind of geek who fig­ures that shit out (and wouldn’t put up with a jet en­gine lap­top). It runs Debian Jessie (“test­ing”) with on­ly mi­nor an­noy­ances — not per­fect, but noth­ing I can’t han­dle.2

Hardware build-quality and dura­bil­i­ty are ma­jor plusses for an every­day car­ry ma­chine, and that’s what ThinkPads are known for. And of course, TrackPoint is tru­ly the best way to mouse. A lot has been said about the new ThinkPad key­boards, and while this one suf­fers from the bull­shit key lay­out (com­pare it to the awe­some, ug­ly 1337-geek clas­sic style), the key­board ac­tu­al­ly feel pret­ty nice to type on, even if the bizarrely-placed PrintScreen key oc­ca­sion­al­ly en­rages me.

And finally…

In the spir­it of bury­ing the lede, here are some things I in­tend to en­joy while tot­ing around this rock-solid, large-screen-and-real-keyboard device:

  • Full desk­top OS that does all the things
  • Better web brows­ing; ap­prox­i­mate­ly 1,000 open tabs
  • Actually writ­ing things, blog­ging sil­ly ideas and such
  • Tons of lo­cal stor­age (SSD + HDD = yay!)
  • Semi-modern PC games, in­clud­ing lots of Humble Bundle goodness
  • Codecademy
  • Interactive fic­tion, per­haps (now, where did I mis­place my patience?)
  1. My most com­mon tablet us­es are as fol­lows: gam­ing, view­ing TV episodes and movies, and web brows­ing. I’m putting this in a foot­note so as not to side­track my­self, but it’s an im­por­tant point. One of the best things about hav­ing the tablet was that it gave me an­oth­er 16 GB of stor­age, on top of the 16 GB avail­able on my phone. A lot of peo­ple seem to think that Google in­ten­tion­al­ly lim­its the stor­age avail­able in their flag­ship de­vices to push peo­ple in­to us­ing their mon­e­ti­z­able “cloud” me­dia of­fer­ings in­stead of lo­cal stor­age. I wouldn’t be sur­prised if this were true, but hon­est­ly, the #1 rea­son I’d like more lo­cal stor­age in my de­vices is not to car­ry around more me­dia, but more and larg­er apps — some­thing you can’t put in the cloud.
  2. I imag­ine Debian Stable or Ubuntu would be bet­ter.

How to transfer photos from a Game Boy Camera to a computer (in Linux)

A few days ago, I found a Flickr group thread that was prac­ti­cal­ly beg­ging for my in­put. It read some­thing like “Hey Everett, you’re sur­pris­ing­ly enough not the on­ly per­son out there with these two in­ter­ests (one ob­scure and the oth­er semi-so). Would you be will­ing to help out quite pos­si­bly the on­ly oth­er per­son in the world who cares about these things?”

Not on­ly was I like, “Heck  yeah!,” but I de­cid­ed that this was wor­thy of blog­ging, in case a third in­di­vid­ual hap­pens to de­vel­op these in­ter­ests. (If this is you, welcome!)

So, in case you find your­self want­i­ng to get crap­py pho­tos—a term I use most af­fec­tion­ate­ly — like these:

off of one of these:

red Game Boy Camera

and you use Linux:

(I kid!)

…like I do, read on.

The hard­ware I’m us­ing to down­load pho­tos over USB is SmartBoy USB car­tridge read­er (which is made by these peo­ple). And there just so hap­pens to be a great open-source pro­gram for fa­cil­i­tat­ing this task us­ing this de­vice (or a sim­i­lar car­tridge read­er): gbcflsh.

So what’s the prob­lem? gbcflsh is on­ly dis­trib­uted as source, and the source fails to com­pile un­der re­cent re­leas­es of Ubuntu. I con­tact­ed the de­vel­op­ers of gbcflsh, and one gave me some sug­ges­tions for fix­ing the source code. They have yet to pub­lish the fixed source, so I’ll doc­u­ment how I got it to compile.

(If you don’t care about this, just grab the bi­na­ry I made: gbcflsh 32-bit, md5sum: 85b185706c3d5fe45b7787787f8510bd; gbcflsh 64-bit, md5sum: 4326e08fcfb5be39004c290df2a71988)

  1. Download and ex­tract the source code.
  2. Install the fol­low­ing packages:
    gcc 4.3.3, qt4-dev-tools, libftdi-dev 
  3. Focus on the fol­low­ing files:
  4. Add the fol­low­ing to the bot­tom of the #in­clude sec­tion of each file:
    #in­clude <cst­dio>
  5. That’s it! Compile it like you al­ready know how to do (which I won’t get in­to here).

gbcflshWhen you run gbcflsh (you’ll need to do so as root, by the way), it’ll look a lit­tle bit like what you see to the right. Select the vis­i­ble op­tions (USB, Auto, Ram: 128 KB) and click “Read RAM.”

If all goes well, you’ll end up with the con­tents of your camera’s RAM in the form of a .sav file. Great! The hard part is be­hind us, but we’re not quite done yet.

Next, you’ll need a pro­gram that will ex­tract pho­tos from the save file. I be­lieve there are a few, but they all seem to be for Windows. Fortunately, the one I use works per­fect­ly un­der Wine. gbcameradumpIt’s called GBCameraDump.exe, and it can cur­rent­ly be found here. Download it, run it via Wine and se­lect the .sav file you got from gbcflsh. You’ll have some­thing that looks like this screen­shot (ex­cept hope­ful­ly with bet­ter photos).

I would al­so ad­vise you to — if this sort of thing mat­ters to you — check the or­der of the saved im­ages. They’re like­ly to be out of or­der due to, it seems, the way Nintendo de­cid­ed to han­dle the sav­ing of im­ages to the car­tridge. (Also, you’re like­ly to find some pho­tos you thought were delet­ed, which may come as a surprise.)

So there you have it: how to get pho­tos off of this cam­era of the past, us­ing the op­er­at­ing sys­tem of the (sigh) fu­ture.

Upgraded to WordPress 3.0

The old adage (which I think I made up) about spend­ing more time geek­ing around with a WordPress in­stal­la­tion than ac­tu­al­ly writ­ing in the damned blog holds true, ladies and gentlemen.

I just fin­ished up­grad­ing this fine blog to the newly-stable WordPress 3.0.

In case you were won­der­ing and/or sit­ting on the edge of your seats, I took great care to:

  1. Disable all of my plu­g­ins
  2. Dump a copy of my WordPress MySQL data­base us­ing the aptly-titled mysql­dump
  3. tar a copy of my WordPress directory
  4. Do the upgrade!
  5. Re-enable the plu­g­ins one-by-one, mak­ing sure each works (or at least doesn’t break anything)

While I know not every­one is so lucky, I’m glad to see that every­thing ap­pears to work here, be­cause I’d be death­ly em­bar­rassed if, you know, Google or Bing’s we­bcrawler came by and things weren’t look­ing up to my usu­al standards.

How Windows ate my EXIF data (and how I mostly fixed it)

The background

As we’ve al­ready es­tab­lished, I love to take pho­tos, and I have a strong bias to­ward dig­i­tal. While I re­ceived my first dig­i­tal cam­era (the afore­men­tioned Game Boy Camera) on my birth­day in 2000, it wasn’t un­til the fol­low­ing sum­mer that I got my first “re­al” digi­cam, a Nikon Coolpix 775.

From there, the flood of dig­i­tal pho­tos be­gan. Initially, I just dumped every pho­to in­to a sin­gle fold­er on my shiny, new, gonna-help-me-do-well-in-college-this-fall lap­top, and let their se­quen­tial file­names (DSCN0001.JPG, 0002, etc.) do the “sort­ing.”

This worked for a while, un­til it be­came clear that hav­ing all of my pho­tos in one fold­er was poor for both or­ga­ni­za­tion and per­for­mance, so I start­ed or­ga­niz­ing my pho­tos us­ing dat­ed sub­fold­ers (e.g. photos/2001/2001-08-12/). This was all the or­ga­ni­za­tion I did for my pho­tos, and was al­so how  I viewed them, up un­til I be­gan us­ing pho­to man­ag­ing soft­ware (first Picasa on Windows, lat­er F-Spot un­der Ubuntu).

The problem

While these apps ex­cel at tak­ing pho­tos and turn­ing them in­to a well-organized stream based on date tak­en, I no­ticed that a small hand­ful of pho­tos were out-of-place in the time­line.1

After spend­ing some time puz­zled by this, it oc­curred to me that:

  1. none of these pho­tos had EXIF data
  2. all of these were tak­en in 2001
  3. all of these had been tak­en in “por­trait” mode (when you turn the cam­era side­ways), as op­posed to “land­scape”

In an ex­am­ple of clear­ly mis­guid­ed, youth­ful in­dis­cre­tion, I had man­u­al­ly ro­tat­ed these pho­tos — re­mem­ber, cam­eras didn’t have ori­en­ta­tion sen­sors back then — us­ing Windows Picture & Fax Viewer (Windows ME/XP’s de­fault), and it ate my pho­tos’ EXIF da­ta! From then on, I start­ed us­ing the camera’s built-in ro­tate functionality.

But, ugh, I still had a bunch of old, messed up pho­tos. Fortunately, I wasn’t to­tal­ly in the dark about these pho­tos’ chronol­o­gy, as I knew the cor­rect dates that these pho­tos were tak­en, thanks to the sur­round­ing se­quen­tial pho­tos still hav­ing their EXIF data.

The solution

For the last few years, I let these few pho­tos just be, an­noyed that they would al­ways show up in the wrong places. So to­day, I fi­nal­ly did some­thing about this: I gave them new EXIF da­ta us­ing the best in­for­ma­tion I had at my disposal.

While I didn’t know the pre­cise time tak­en, I did have dates for these pho­tos, so I fig­ured giv­ing them EXIF with the right date and wrong time was bet­ter than no date at all. I ac­com­plished this us­ing a pair of Linux pro­grams: jhead and touch. Here’s how:

First, I cre­at­ed an EXIF tag for a giv­en pho­to us­ing jhead:

$ jhead -mkexif DSCN1282.JPG

Then, I touched the file (in Unix-y par­lance, change the file’s “mod­i­fied” time­stamp) to mid­night (00:00:00) on the ap­pro­pri­ate date (e.g. August 12, 2001):

$ touch -t 200108120000.00 DSCN1228.JPG

Finally, I used jhead to change the file’s EXIF time­stamp to the newly-fixed mod­i­fied date:

$ jhead -ds­ft DSCN1282.JPG

Having re-added the prob­lem im­ages to my F-Spot li­brary, the pho­tos now ap­pear more-or-less in the place they should. They’re now good enough that I’ll nev­er again have to see those pho­tos mixed in with the wrong year!

  1. I know what you’re think­ing: that there were times when I for­got to set the date on my cam­era. Nope. No way. I nev­er for­get to set the date on my cam­era, be­cause mak­ing sure my pho­tos have the cor­rect date and time is some­thing that I’m a bit ob­ses­sive about, and the first thing I do af­ter charg­ing my camera’s bat­tery is al­ways check the date.

…but my new camera sucks a little too much

[If you’re just join­ing us, see part one.]

I re­cent­ly felt like I need­ed a new crap­py cam­era in my life. I found my­self in a drug­store yes­ter­day, where I pur­chased one of those minia­ture ones, a Vivitar Clipshot (née Sakar 11693). At $10, the price was right but it’s a lit­tle too cheap to have a screen built-in, and the “viewfind­er” is a laugh­ably in­ac­cu­rate hole in the body. Even more ex­cit­ing, I thought! It’ll be like tak­ing pho­tos with film and wait­ing to see what develops!

I couldn’t find ref­er­ence to the cam­era work­ing in Ubuntu with a quick Web search, but the specs on the pack­age claimed that it works in OS X with­out dri­vers. This seemed to im­ply that it was a stan­dard USB Mass Storage de­vice, the kind you plug in and have just work, as it ap­pears to the com­put­er as a re­mov­able drive.

So I ex­pect­ed quick and easy ac­cess to my pho­tos. I was wrong.

The OS de­tects the de­vice, but not as a nor­mal cam­era de­vice, nor a Mass Storage de­vice. This is what lsusb had to say about it:

Bus 007 Device 008: ID 0979:0371 Jeilin Technology Corp., Ltd

Searching for that lead me to a num­ber of blog and fo­rum posts where peo­ple dis­cussed ways to pos­si­bly get the cam­era work­ing, but to no avail. This post re­ceived a num­ber of replies, with this re­ply be­ing the most help­ful: (em­pha­sis mine)

Professor Theodore Kilgore from Alabama has been work­ing on a dri­ver for this cam­era. As of about 6 months ago, the Professor had me down­load his dri­ver for the cam­era, and the dri­ver lets down­load files from the cam­era. But since the pic­tures are stored in an en­crypt­ed for­mat on the stor­age me­dia of the cam­era, there is still work to be done to de­crypt the pic­ture files in­to a view­able for­mat (this is the last I heard anyway).

The pho­tos are stored en­crypt­ed on the cam­era, so you have to use the in­clud­ed Windows soft­ware to down­load them. Glad to know they’re be­ing pro­tect­ed… from me. This crap­py cam­era is a lit­tle too crap­py for me. I haven’t tried it on a Mac yet, but I can’t imag­ine how this could pos­si­bly work with­out drivers.

There will be more crap­py dig­i­tal cam­eras in my life, but one can on­ly hope that the next one sucks in the way it should.

Breaking news: This piece of garbage does not work in OS X either.

More introduction (this time, the geek side)

I un­der­stand that self-identifying as a geek in 2010 makes me nei­ther cool nor spe­cial, now that geeks are con­sid­ered… you know… cool and spe­cial. But hav­ing laid out my blog­ging cred, I’d still like to make the case for the geek side of the equa­tion (equa­tions be­ing some­thing I ac­tu­al­ly know very lit­tle about).

Yep, a dis­taste for math­e­mat­ics cur­tailed dreams of study­ing com­put­er sci­ence, or some­thing along those lines, in col­lege. Back in mid­dle school, how­ev­er, I was hap­pi­ly hack­ing BASIC in my school’s Apple //e lab. I had sort of a knack for it; in com­put­er class, I raced through the pack­et of pro­grams we were re­quired to tran­scribe faster than any­one else, and be­gan spend­ing my time writ­ing my own pro­grams, which would do things like tell my friend that his fa­vorite foot­ball team sucked, re­peat­ed­ly, through the mag­ic of 20 GOTO 10.

I didn’t re­al­ly ap­ply this knowl­edge very well at the time; it would still be a cou­ple of years be­fore I had a com­put­er at home. And even when I fi­nal­ly did, a com­plete­ly awe­some Pentium 166 MHz IBM Aptiva1 run­ning Windows 95, I didn’t quite know how to get start­ed pro­gram­ming on it.2

Another de­vice ap­peared in my life a few years af­ter the com­put­er; I re­ceived a TI-83 graph­ing cal­cu­la­tor for use in Algebra II. I ini­tial­ly found that it made a great mo­bile Tetris ma­chine, but it wasn’t un­til read­ing Bill Gates’ The Road Ahead, in which he re­count­ed his ear­ly days pro­gram­ming prim­i­tive com­put­ers, that I found my­self in­spired to do more with it.3

The cal­cu­la­tor seemed like a good place to start pro­gram­ming, es­pe­cial­ly be­cause the user man­u­al con­tained an en­tire chap­ter de­vot­ed to teach­ing the TI-BASIC lan­guage! I picked this up pret­ty quick­ly, since I still re­mem­bered a lot of con­cepts from Apple BASIC. In my ju­nior year of high school, I was soon writ­ing pro­grams to help me take short­cuts to solv­ing math and sci­ence prob­lems. But most im­por­tant­ly, I want­ed to make games.

So I made a game. How I did so could be its own en­try, and very well may be in the future.

This in­spired me to sign up for the Computer Programming I elec­tive in my se­nior year. They taught us Visual Basic, and the class was nei­ther in­ter­est­ing nor fun. This, paired with the re­al­iza­tion that study­ing com­put­er sci­ence in col­lege meant tak­ing lots of math (some­thing I’d al­ways heard, but col­lege course cat­a­logs as­sured), made it clear that I should fo­cus on the oth­er thing I liked do­ing: writing.

I ma­jored in com­mu­ni­ca­tions, and the rest is his­to­ry. Except for a fruit­less for­ay in­to Python a cou­ple of years ago, I haven’t pro­grammed much lately.

But I still em­body, I think, the hack­er ethos. For me, 2005 could al­so have been called the myth­i­cal Year of Linux on the Desktop, thanks to the then-nascent, but still quite amaz­ing, Ubuntu dis­tri­b­u­tion. While it was alien to me, and didn’t quite ‘just work’ on my lap­top, I per­se­vered (smug Windows-using friends would say I “suf­fered”) and use it to this day. I love Ubuntu, and it still… al­most just works.

Along the same geek lines, do­ing more with the de­vices I own seems to be a re­cur­ring theme in my life. These days. I car­ry in my pock­et a root­ed Android phone (run­ning CyanogenMod), and at home have a homebrew-enabled Nintendo Wii and DS, a Canon PowerShot sport­ing CHDK, and Linksys routers run­ning the dd-wrt and Tomato firmwares. My (lack of) skill-set means that you won’t find me help­ing the cause of hack­ing open a new de­vice, but I’m glad to file the oc­ca­sion­al bug. In short, I like to get as much as pos­si­ble out of my de­vices, in­clud­ing, quite lit­er­al­ly, my da­ta. Backup is a top­ic I’ll be com­ing back to, for sure.

I think that about sums up my geek side (and un­in­ten­tion­al­ly makes a pret­ty good case for my navel-gazing side).

  1. Mine looked ex­act­ly like the tow­er pic­tured there!
  2. Let’s re­mem­ber this when we talk about the iPad.
  3. My 2010-self is a lit­tle em­bar­rassed by hav­ing drawn geek­spi­ra­tion from Bill Gates, but you’re read­ing a truth­ful blog.