Drop Box — Medina County Board of Elections

The Medina County Board of Elections is located down the road to the North of the Hobby Lobby / Walmart plaza (Stonegate Drive). It’s on the south side of Stonegate Drive, in a little strip-mall looking plaza.

The mail-in ballot drop-box is located to the right of their door. There are two envelopes you need to use. One that you sign & put personal info on — that needs to go into the outer mailing envelope (aka privacy envelope) even if you’re not actually mailing the ballot. You can drop off your ballots any time — slide the envelope into the slot, so you don’t have to touch anything except your ballot.

Updating JQuery

We’ve got to upgrade some Javascript modules at work — JQuery, Bootstrap, etc. Problem is that changes between the versions mean there’s a lot of rewriting required before we can update. And we pull in these modules using a shared header file. While we could stage all of the changes and update the entire website at once … that means we’re all dedicated to updating our components & are delaying the update until we’re finished.

That’s not ideal — and has the potential to break a lot of things at once. I plan, instead, of putting a default version in the shared header file. And some mechanism to source in a newer version by setting a variable in the individual tool’s PHP code before the header is pulled in. So each tool within the site has a $strJQueryRev, $strBootstrapRev, etc variable. Then the shared header file looks for that variable — loads a newer version when requested or loads the currently used older version when no version is indicated.

if($strJQueryRev == "3.5.1"){
 echo "<script src=\"https://code.jquery.com/jquery-3.5.1.min.js\">\n";   
}
elseif($strJQueryRev == "3.1.1"){
 echo "<script src=\"https://code.jquery.com/jquery-3.1.1.min.js\">\n";   
}
else{
 echo "<script src=\"https://code.jquery.com/jquery-2.2.4.min.js\">\n";        # Old, in use, version is default
}

Or even

if(!$strRevisionNumber){$strRevisionNumber="2.2.4";}
echo "<script src=\"https://code.jquery.com/jquery-$strRevisionNumber.min.js\">

Each developer can add a version number to a single tool, test it, push it up through production using the newest modules. Move on to the next tool. The site still isn’t done until we’re all done, but we can slowly roll out the update as people are able to test their tools.

Hovercraft Battle Arena Hack

We’d been playing a silly game on the FireTV cube — Hovercraft Battle Arena. It’s what my former boss would call good, stupid fun. But you’ve got to wait to open these crates to get stuff — gems, money, and components to upgrade the hovercraft. We wanted to be able to play with maxed out hovercraft. So I poked around a little bit and found a cheat for insta-upgrades. Game components are stored as files. For Android installations, the files are under /Android/data/com.highscorehero.battlearena/files … but it’s a lot easier to write a batch to copy files in Windows. The Windows app data files are under %userprofile%\AppData\Local\Packages\ … then the trick is finding the right HighScoreHeroLLCHoverfractBattleArena folder.

Once you find the files, there’s no validation on the files. Now it’s binary stuff that would take a good bit of effort to manually edit (i.e. if I wanted to just give myself 10k gems, I’d have to figure out which exact bits to flip) but you can grab an entire file when the game is in a state you want. That is — when you have four crates ready to open, copy out the Crates* files. When your near the end of the season and at level twenty-something, copy the XP_Int.data file. When you’ve not claimed any of the season rewards, copy out the SeasonReward_Bool.data file. Drop those files into the live folder used by the game & launch the game. Now you can open four crates, claim the gems from each level, and close the game. Copy the season rewards and crate files back and do it again. And again. And again. Eventually, you’ll have all of the blueprints, upgrade parts, gems, and money that you would need. You can make a backup of the entire folder at this point. Use your money and gems to upgrade a hovercraft, then copy out the files for that craft. Snap the backed up files back so you’ve got all of the gems and money, then upgrade a different craft. Repeat until you’ve got upgraded files for all craft.

It does, unfortunately, kind of ruin the game. There’s no point — you’re not accumulating points to upgrade anymore. Anya and I still like it … but it’s absolutely not the same 🙂

On Originalism

Originalism can roll back a frightening amount of legislation — New Deal, civil rights, food safety, etc. There’s even a school of thought that says the 14th amendment doesn’t mean stuff like the bill of rights doesn’t limit state government. Just Congress. Which would mean a *state* is free to enact limits that abrogate our federally ensured rights. The illogic of the argument is, I assume, why originalists inconsistently apply their beliefs rulings. Think of the 11th Amendment interpretation that “by Citizens of another State” includes ‘citizens of *that* state’, for instance. Or the purported Second Amendment right to weaponry that hadn’t been imagined in the late 1700’s. Originalists make decisions contrary to the founders’ understanding of what they wrote.
 
And originalism seems to invalidate itself — was the understanding at the time the Constitution was adopted that most legislation requires a Constitutional amendment?

Coop On Wheels

Scott built axles and wheels to move the chicken coop across the yard. We jacked a side up, slid the axle underneath, and lowered the coop. Repeated the process on the other side and, voila, a mobile coop. We pushed it because we needed to adjust the angle of the axles to make a few turns. But it moved surprisingly well.

List Extensions Within Folder

It didn’t occur to me that Apache serves everything under a folder and the .git folder may well be under a folder (you can have your project up a level so there’s a single folder at the root of the project & that folder is DocumentRoot for the web site). Without knowing specific file names, you cannot get anything since directory browsing is disabled. But git has a well-known structure so browsing to /.git/index or really scary for someone who stuffs their password in the repo URL /.git/config is there and Apache happily serves it unless you’ve provided instructions otherwise.

A coworker brought up the intriguing idea of, instead of blocking the .git folder so things subordinate to .git are never served, having a specific list of known good extensions the web server was willing to serve. Which … ironically was one of the things I really didn’t like about IIS. Kind of like the extra frustration of driving behind someone who is going the speed limit. Frustrating because I want to go faster, extra frustrating because they aren’t actually wrong.

But configuring a list of good-to-serve extensions means you’ve got to get a handle on what extensions are on your server in the first place. This command provides a list of extensions and a count per extension (so you can easily identify one-offs that may not be needed):

find /path/to/search/ -type f | perl -ne 'print $1 if m/\.([^.\/]+)$/' | sort | uniq -c

 

Dueling Town Halls

It struck me, while watching the dueling town hall events, how normalized it has become that the national news talks about the president every.single.day. I get that it’s news because he’s the president … but, for most of American history, the president did his thing. Some people didn’t agree with his choices, some did. But it wasn’t so outrageous as to warrant being broadcast to the entire country on the national news. I don’t mean the cable-news plenty-of-time-to-fill stations — I mean the half hour daily news on the national networks.