atxgeek 


just one more geek in a sea of austin techies

April 21, 2018

Quick line count via Windows command line #DevGeek

Every so often I need to get a quick line count estimate across a collection of files. Line counts are helpful in broadly defining the scope of reviewing or updating existing code files.  In such cases I only need a ballpark estimate of total lines of code across multiple files.  It turns out that all we need is the Windows command prompt and a one-line command:


At first glance this solution isn't overly intuitive but it's actually quite simple.  The TYPE command parses each line in the specified file and pipes each line through the FIND command which searches for string values matching the specified string.

In this case, we extend the TYPE command's usefulness from parsing just one file to parsing collections of files by using a wildcard search for all files ending with ".log".

For the FIND command, we use the "/V" switch to invert behavior and have the command look for lines that *don't* have the specified string.  We use the "/C" switch to tell FIND to give us a count of matched (unmatched in this case) lines instead of the content of the lines.  Finally we specify any string value we can reasonably expect to *not* exist in our searched files.  I used "zzxxccvvbbnnmm" in my example.

Here's the result of the command on a directory where I placed two sample log files:


See?  Quick and simple as long as you can remember the "/V" and "/C" switches.


Counting lines of files across multiple file types
What if we need to count lines between files of differing file types?  For instance, if I'm counting lines in both ".log" files as well as ".xml" files?  Easy: just specify the additional file search as part of the TYPE portion of the command:



For your copy-and-paste convenience, here's some copy-ready text:

  TYPE c:\temp\*.log | FIND /V /C "zzxxccvvbbnnmm"


Enjoy!


March 27, 2018

JBL Everest firmware update #SoundGeek

Owners of JBL's good-but-flawed Everest headphones have long-complained of the processing lag that prevents sound from being in synch with video when pairing with a TV or watching videos on a mobile device.  JBL previously addressed this with a firmware update (yea!) but then, without explanation, removed the update from various product support pages (boo!)

If you have "normal" (i.e., not "Elite") Everest 100, Everest 300, or Everest 700 headphones and have sound lagging behind video then you're in luck:  I have located the elusive firmware update over on JBL's Japanese site.  The site isn't in English but the firmware package itself is and includes English instructions.

Here's the link to the firmware:
http://jbl.harman-japan.co.jp/support/data/HID.ZIP

For a Google-translated-into-English version of the web page, click here.

I was able to upgrade a set of Everest 300 headphones from firmware v1.1 to v3.1 with no issues (via USB connection to a Windows 7 PC). The update fixed the audio lag issue for me but your mileage may vary.

Cheers!

February 14, 2018

Facebook's crippled "fake news" feature #SocialMediaGeek

This week Wired ran a very interesting story peeking behind the curtain of Facebook and Mark Zuckerberg.  The story tracks the past two years' turmoil of Facebook being increasingly leveraged as a tool to deliver intentionally-divisive content and how Russian agents garnered hundreds of millions of likes and shares for fake articles by simply using Facebook's standard advertising features.

One of Facebook's responses has been to partner with a number of fact-checking entities and provide users with a feature to flag Facebook posts as "fake news". The more times a post is flagged as "fake news", the more likely it will get reviewed by a fact-checking partner.

Unfortunately, the "report fake news" feature is a lot less useful than you might think.  Read on to see why...

January 23, 2018

Agents of S.H.I.E.L.D. tech #GearGeek

When I recognize an off-the-shelf electronic item in TV or film, I like to verify I'm seeing what I think I'm seeing. When I happen to be able to ID an item I feel like I've somehow validated myself in some small way though I know, in reality, it's all just more useless geeky knowledge crowding my brain.

Why keep that useless knowledge to myself?  Read on to crowd your own brain with some useless tech trivia...

January 12, 2018

WAVE Web Tool results vary by browser #WebDevGeek

One-line summary:  The WAVE tool from WebAIM is inconsistent across different web browsers.

My website work often depends on ensuring web accessibility requirements are met.  These were typically referred to as "508 requirements" but the US government has finally moved on from the old 508 rules and has now embraced the newer WCAG specifications.  Specifically, if you're earning money from the US government to provide any kind of web content, as of 1/18/2018 you're required to meet WCAG 2.0 "AA" web accessibility standards.

Recently I found an issue with one tool, WAVE, which is widely used by some federal government entities to scan websites for accessibility issues...

October 5, 2017

The Verge Overlooks the Beats Angle #HeadphoneGeek

In a post earlier today, The Verge's Vlad Savov argues that Google's dropping of headphone jacks from the upcoming round of Pixel phones "proves Apple was right".  Vlad is a prolific contributor of tech-related reports and opinions and, in my opinion, is often right on the money in his assessments.  However, I take exception to today's article and wonder how Mr. Savov could have possibly forgotten to mention the huge elephant-in-the-room that is "Apple/Beats".

Steady yourself, because I'm about to delve into some tech conspiracy theory I think is borne out by Apple buying a company that produces wired headphones and then electing to drop the wired headphone jack from future iPhones.  Read on for the full story...

June 12, 2017

Finally... an accurate cellular plan review #PhoneGeek

I've spent more time than I care to admit analyzing cellular services. Today I finally read a "Best Low, Medium & High Cellular Plans" article that I actually agree with.  Normally such articles focus only on the "big four" US carries and so overlook too many alternative carriers and plans.  For instance, my wife's phone service is from Republic Wireless while mine is from Google Fi.  I'll forgive you if these options don't sound familiar -- you can read more about them in my previous posts here and here. My son's *free* plan (yes -- it's really free) is on FreedomPop which you can read about here.

Yes, you read that previous paragraph right: our family uses three different cellular plans from three different carriers.  The end result is we spend a total of about $50 a month for cellular service.  Refer back to, "I've spent more time than I care to admit analyzing cellular services..."

Getting back to the point, though:  the article I read did a fine job boiling down current cellular plan offerings to the best "low-medium-high" options.  Read on to see the results...

January 26, 2017

"Mission One" PC is a BRIX #PCGeek

Gigabyte BRIX 2807
The new year started with news of Endless Mobile's expansion of its low-cost PCs into the US market.  The company's premise is that low-cost solutions can still embrace alluring design.  To be sure, the company's brand new "Mission Mini" is likely the best-looking $130 PC I've seen to date (more on that, below).  The company's brand new step-up system, the $249 "Mission One", is bigger and boxy-er but still attractive.

The new Mission One
is a Gigabyte BRIX wrapped
in a warmer-looking package
Good news:  
I have photos of the "Mission One" internal components... or the equivalents thereof, to be exact.

Surprising (maybe) news:  

The "Mission One" is... a re-branded Gigabyte "BRIX 2807" (circa 2014), a PC small enough to be mounted on the back of a computer monitor.

Interesting news:
You can build your own "Mission One" clone PC using a Gigabyte BRIX $99 kit -- just add a DIMM and an SSD and install the free Endless operating system.  Oh, did I forget to mention the OS and 100 accompanying apps are free?  Read on...


November 29, 2016

Monoprice mini DJ mixer revealed #AudioGeek

Monoprice.com represents one of those vendors that "in-the-know" people seem to gravitate to.  Much like PC geeks seem to have Newegg.com on speed dial, wire and cable geeks (yes, that's a thing) know all about Monoprice's basic-but-good offerings.

Over the last several years Monoprice has diversified by slowly expanding beyond wire and cables.  Now you can order up a variety of wire-interconnected gear such as Monoprice-branded speakers, microphones, guitars (!) and audio mixers.

On the point of mixers, I recently happened upon the actual brand behind Monoprice's current "baby" DJ mixer model #614305.  Notably, Monoprice only charges 2/3 the normal retail price...

September 24, 2016

TIP: Anti-anti-AdBlock #WebGeek

If, like me, you use an "ad blocker" in your web browser to improve your web experience then you've likely run across so-called anti-ad blocker measures on sites like Forbes, Wired, and other big-name news websites.  Over the past year many of these sites instituted measures that prevent you from viewing content unless you turn off your ad blocker.

Tip if you use AdBlock
Click the AdBlock icon that appears near the top of your web browser and select the "Don't run on this page" option from the pop-up menu.  Done!  This step will deactivate many site's "anti-ad block" content blockers on all of a site's pages, not just the single page you allowed ads on.

(Don't have AdBlock?  Check it out here:  https://getadblock.com )

Allowing ads only on the initial page can help skirt ad walls.
Here we see the AdBlock plugin blocked 16 ads on the home page of "Forbes.com".

Why This Works (for now)
Many of the current anti-ad blocker solutions interpret this action as you having deactivated ad block for the entire site and so will allow you to browse all pages without issue.  On a site like Forbes.com you won't even have to see ads on the page you "allowed ads" on since Forbes' solution uses an intermediary page to shield content.  In other words, all you'll have done is to "allow ads" on the intermediary page which Forbes will no longer show you since the site believes you've deactivated your ad blocker for the entire site.

September 1, 2016

Give your kid a phone...cheaply! #PhoneGeek

My kids are growing up and getting into more and more activities.  A cell phone has become an item my wife and I *need* the kids to have.  Not for social use, mind you, but as a tool for necessary family communication.  And for taking photos.  And maybe a few games.

Notorious penny-pincher that I am, I've settled on a rather excellent combination of phone capabilities and value.  Our first "kid phone" includes:

  • Android 6.0; 2GB RAM; 48GB storage; HD display (1280x720)
  • Location service + remote lock/wipe so I can pinpoint phone and secure it if needed
  • Limited monthly talk (200 minutes), texts (500) and data (500MB) to force responsible phone use
  • Ability to increase/decrease monthly limits as needed
The kicker?  I paid a one-time price of $71 with no monthly cellular service charges (free cellular service!)  That's $71 and done.  I can harp at my kids for hours on the need to be "phone-responsible" but the truth is that I'm only out $71 if the phone is ever lost/broken/stolen.

Read on to see what I've put together...