HDCP Unauthorized. Content Disabled – Roku

This evening my Roku started showing a purple screen with the text “HDCP Unauthorized. Content Disabled” when I tried to play any show.
The audio still worked though.

The solution to this was really deep, see if you can keep up with all this:

1. Wiggle the HDMI cable connector(s).

That’s it!

Galaxy S6 Wifi ‘authentication error occurred’ since firmware-update, high battery usage

After updating the firmware on my Samsung Galaxy S6 not long ago (early December 2017?) I immediately noticed my battery used became absolutely horrible. Like, dead in 90 minutes kinda bad. After doing the normal things like clearing the cache etc, and getting only marginal improvements, I finally noticed that the wifi connection on the phone was having continuous errors connecting to my ATT wireless router- with a message “authentication error occurred”. What? This definitely worked before so why not now? With this info, I did more googling and finally found out a lot of people are having this same problem.

The problem apparently is caused by the ATT router having a 2.4 mhz and a 5ghz radio that both use the same ssid and password- This is how ATT recommends running it so that intelligent wifi clients can automatically switch to whichever radio is giving the strongest signal at the moment.

Something with the new firmware on the S6 broke this capability- likely due to a security patch. SO: The solution, for now at least until Samsung gets around to re-fixing this, is to change the name of one of the radios so that it has a distinct ssid. Then on your phone, you’ll just need to pick which one to use.

I myself did a slightly different hack to get this working for now- I enabled the “guest” radio on the ATT wifi and it only uses a 2.4 ghz radio- so now my phone is connecting to this network instead. This will have to do for now. Battery life is much improved again, I’m curious what my data plan usage will look like for this month though.

Beerita recipe

A beerita is basically a margarita with some beer mixed in, usually a mexican beer to stay in theme. I often make a “cheatarita” (more on that later) as my go-to for drinking some tequila in a less dense/easier to make/lower calorie fashion, but sometimes I like to make my own version of a beerita as well.

Here is my weird version of a Beerita:

1 shot tequila (use your fave)
.5 shot triple sec
.5 shot lime juice, or can use some roses’s sweetened lime juice for all or partial
.5 can miller lite (just kidding! but not kidding) or your fave beer or lite beer
.5 can diet lime drink (7up/sprite etc)
1 tbsp orange juice concentrate, optional

Add enough ice to make it chill.
Don’t shake! beer and softdrinks are not fond of this.. stir slowly

drink carefully… it tastes like a lighter drink, but it actually packs the punch of both tequila *and* a beer.

IP firm that functions as a partner instead of a hired service

I’ve missed a good number of opportunities over the years for some intellectual property on some unique technologies that I *think* I invented (they may have already been) and which later showed up in the market, sometimes very successfully. In one case, a partner and I built an electronic device that later become a multi-billion dollar industry, but again we did not lock down any IP for it at the time. That would have been a nice one.

Although my companies have gone on to procure a number of patents in a couple industries over the years, some of the larger ideas I’ve had I chose not to pursue IP for due to several reasons, usually a combination of these:

– Not being my primary industry/business focus
– Not worth spending 5+ figures on to attempt to pursue, especially when not in primary area of focus- also 5 figures has been a lot to me in the past.
– Lack of a patent/IP firm that actually tries to help achieve success instead of simply trying to bill the max hours.

I haven’t researched this much yet, but I’m curious if there are firms that will partner with small businesses to handle all their IP in exchange for licensing revenue. And perhaps even some equity. I’m aware of the “Patent Your Idea” services out there, but they often are just services trying to collect a fee for some basic submission work and not legitimate partners.

Having said this, I currently have one “big” idea related to e-commerce, a couple others that would be big in a smaller sporting goods industry, and one niche in the VR space.

I’m posting this on quora as well – see here https://www.quora.com/Are-they-IP-firms-that-will-partner-on-your-IP-and-work-on-licensing-it-and-defending-it-as-a-partner-instead-of-just-a-paid-service

dism restorehealth error 0x800f081f fix

my pc was having some weird issues so I found instructions to do the sfc /scannow and dism commands that should check and repair the core system files.

The directions I found online had me run sfc /scannow first, followed by a few dism commands, and then the dism /Restorehealth command at the end. Everything worked until this last step, where it would error without being able to find the source. It’s supposed to pull the source files directly from windows update, so this was odd. digging deeper led me down a path of downloading an iso of windows 10, and extracting some install.esd and try to use it as a source. Same problem. Then tried converting the install.esd into an install.wim. Same problem again.

After banging my head on this and spending more time than I should, I ran across one small post online about running the commands in a certain order to make it work. It was so simple I assumed it wouldn’t work, but why not… tried everything else.

So this is what I ran to FINALLY get my RestoreHealth dism operation to work- from an admin elevated command prompt run these three commands in this order:

dism.exe /online /Cleanup-Image /StartComponentCleanup

sfc /scannow

dism.exe /online /Cleanup-Image /RestoreHealth

At least for me, this was the magical order. I’m logging it here in case I need it again someday.


PHP on Windows, IIS, FastCGI results in MySql Sleeping Connections and Too Many Connections error

Not long ago we moved a wordpress based website from an ovh account to a windows server we already had running other things. (Nothing against OVH, just no point in having another server when we have excess already). We’ve run a number of wordpress installs on IIS and Windows, and the FastCGI implementation seems to work really well.
We started having occasional outages with the site after about a week or so, the error being “too many database connections open”. I initially thought this was being caused by an API call the site makes to a service, and that the api might be experiencing slowdowns causing the site to sit too long with open db connections and causing this issue. But eventually this was ruled out.

Mysql was showing a lot of “sleeping” connections to the database, so it looked like something was opening a lot of connections but not closing them. This is usually not an issue with Mysql and php because the connections are auto-closed at the end of each request.

BUT- when you run FastCGI on windows and IIS, part of the “fast” portion is that the service doesn’t actually end the whole process after every request- the service keeps running and waiting for the next page request to process. As a result apparently FastCGI will keep open any database connections that are now explicitly closed, until they time out some time later. So if you only have a few connections being made, your server will probably be able to keep creating them and they will expire in time for the server to not run out of resources, but in instances where it cannot keep up, your site will go down and start showing the dreaded “too many database connections” error page.

Note that the wordpress site itself doesn’t have this issue- the problem I only ran into with some custom php code that have been added onto a wordpress site. If this code were to use the correct wordpress database access methods instead of the hard coded ones, it would have operated fine as well.

Lesson- explicitly close your mysql connections in custom php code, or use the wordpress database access classes instead of your own. It might not be a problem usually, but this will cause server crashes in instances where the code is installed on Windows, IIS, and FastCGI.

Home Raising in Houston, after Harvey

Update- this link should have some options for raising your house or home in Houston- Houston Home Raising

Raising your home further above the ground is something I just heard of in the aftermath of Hurricane Harvey in Houston Texas. It’s not inexpensive, but apparently there are actual options for this, including raising a house that is on a slab (pier and beam can obviously be raised without nearly as much effort). I’m researching this more and will be adding more info on Home Raising in Houston once I find more info.

I’m also curious if future home builders in the region will be considering using a “stilt home” design to raise the house much further above ground level. These designs are popular in truly coastal towns such as Galveston, where storm surge can easily raise water well into where the first story of the house would normally be. This design would be a bit extreme (and odd looking) to use much further inland, but a hybrid of the design might make sense- especially in 2 and 3 story houses, perhaps the first floor can be water hardened in such a way that flooding has minimal impact on the house and it can be back in action quickly. Researching this as well.

Crashplan Home replacements and alternatives

Crashplan, my favorite backup software, recently announced they would be discontinuing the consumer or “home” product from their lineup and will just focus on business customers instead. This sucks as I had settled on using their product for all my backups some time ago, and have it running on a number of machines. The good for me/bad for them feature that I really liked is the p2p backup options- I have a number of friends I use crashplan with to back up each others’ data to each other. Good for me because I don’t have to pay for cloud storage. Bad for crashplan, because they don’t make any rev off of me… so maybe I’m part of the reason they’re discontinuing?

I’d love to see a p2p focused product like crashplan replace it, but I’d really love to see it as an open project. (This guy kinda read my mind on the topic – https://m4rc.us/2017/09/06/the-ultimate-p2p-backup-software-or-the-definition-of-insanity/

Crashplan, if you read this, are you interested in selling off the consumer part of your service? I see you are currently referring these customers to another service that I won’t name here.. hate to see that happen as well. Give me a call guys. brady dot moritz at gee mail dot com. (as if bots can’t figure that email out nowdays…)

Anyway- I’ll be researching and updating here for what alternatives are out there. Comment if you have any input.

Update: This isn’t a replacement, but this page goes into detail about recovering your data *after* crashplan does shut down- this could be a headache for users who need to restore their data after crashplan officially shuts things down and effectively (in theory?) will block you out of your own data:  https://github.com/OurDataNotYours/PlanC

Sedis Kickstarter by Nefer Games

Nefer Games is running a kickstarter for their first gaming system called Sedis- think of a six sided dominos, add a pile of math, and you get the new Sedis tile system. It’s claimed to be only the 4th generic gaming system in the world, behind dominos, dice, and cards. Go check out the kickstarter and make a pledge to get this project cranking!  https://www.kickstarter.com/projects/nealmurthy/sedis-make-your-own-rules

6÷2(1+2)=? How do you solve this?

6÷2(1+2) is one of those order of operations problems that pops up on social media occasionally and causes people to disagree on the answer and get all angry about it 😉

The reason the disagreements occur is based in order of operations. Most of us know to complete the inside of the parenthesis before applying the other operators, but after doing this, we effectively go from 6÷2(1+2) to 6÷2(3), or 6÷2×3

Now, if we apply PEMDAS, we see M goes before D, so do the multiplication first and then apply the division, and this gives us an answer of 1. Done!

But wait- PEMDAS has this sneaky little misunderstanding- it actually has MD and AS grouped together. So really it should be PE(MD)(AS). Because we do Multiplication *and* Division in the same pass, from left to right. Same applies to Addition and Subtraction, but we’re not concerned with that right now. SO- solving from left to right gives us 9.

And 9.. is the correct answer.

Reference for PEMDAS – See the mnemonic section here: https://en.wikipedia.org/wiki/Order_of_operations
And the specific quote from the page is: “These mnemonics may be misleading when written this way, especially if the user is not aware that multiplication and division are of equal precedence, as are addition and subtraction. Using any of the above rules in the order ‘addition first, subtraction afterward’ would incorrectly evaluate the expression

So now you either owe your friends an apology, or it’s time to gloat.. but don’t go overboard if the latter, ok?

Silverlight in Edge Browser

I found out this evening (or likely knew before but had forgotten) that Edge browser does not and will not support the Silverlight plugin from Microsoft. So if you had any awesome .net code you could run inside a browser, you’ll need to fire up an old version of Internet Explorer, or possibly run Firefox (last I heard, it still supports it, but Chrome does not now either). Weird times.

You can check your version of Silverlight by going to http://silverlightversion.com and download the latest Silverlight at http://silverlightdownload.com … but don’t bother doing either of these if you’re using Edge browser!

Moving Google Analytics property to a different account

If you buy a website with a long history online, you’ll likely want to preserve the google analytics account history. If the previous owner can’t give you control of the account with this history, things can get a little weird. The options I’ve found so far are:

-The prior owner can just add your login to the account in analytics. This works fine, but if they only give you a read-only login, you don’t have control over this and they could delete your access at any time.

-I’ve seen an option for moving a property to a new account in my analytics account, so I have a theory that if I create a new account and give the original owner’s login full admin access to this newly created account, they might be able to move control to it. I haven’t been able to test this, and I think it might be a new feature.

-You can create a new analytics tracker in your own account and add it to the site. If combined with the first option above, you can view the old account for historical data, but also start gathering all new data in your new account. Not the best solution, but better than nothing. Here is sample code showing how to do two trackers at once – notice you have to give a tracker name to the second one, as they can’t both be the default tracker. In this example, “clientTracker” is the name given to the second one. THEN be sure to include it in the send command, by PREPENDING the tracker name + “.” to the send command. See below.

ga('create', 'UA-XXXXX-Y', 'auto');
ga('create', 'UA-XXXXX-Z', 'auto', 'clientTracker');

ga('send', 'pageview');
ga('clientTracker.send', 'pageview');

Margarita Recipe

My latest rendition is: the “3 man margarita” – serves about 3 men (wow?)

4 shots tequila
2 shots triple
1 lime
1 small orange
1 big squeeze lime juice (or, more limes)
splash of truvia- powder is good, liquid is ok
giant spoon of orange concentrate (really big)
3 tall glasses of crushed ice
blend it for long time

PHP code for Bing/Microsoft/Azure translator

Microsoft has yet again changed the API service for the translator api they offer (formerly known as Bing translator, Microsoft Translator, Azure Translator?). It’s now been moved to Azure, and is under the “Cognitive Services” offerings. Maybe it will stay here for more than a couple months before they mess with it again?

I needed to update a PHP app that calls the bing translator API, and couldn’t find anything that did the trick. Prior to the full Azure move, the service has been put under a data market portal, and later the simple basic auth api was updated to use OAuth for security. The latest iteration still uses Oath, but it’s simplified now to the point that all you need to pass is the secret key to get the authorization token – as opposed to previously requiring an app name, some domain scope thing, etc- a lot of moving parts. Now all that is needed to get a token is this:

Option 1: Pass key using header

curl --header 'Ocp-Apim-Subscription-Key: ' --data "" 'https://api.cognitive.microsoft.com/sts/v1.0/issueToken'

Option 2: Pass key using query string parameter
curl --data "" 'https://api.cognitive.microsoft.com/sts/v1.0/issueToken?Subscription-Key='

The body of the request is the token you use- so you don’t need to parse a JSON result or anything.

Here is a PHP class you can use with the latest greatest api- Note that this code hits the issuetoken request with every request, the tokens are good for a period of time (30 minutes if I recall) so this code could use caching to only request a new token after it expires. I’ll update this later. Also the code is pretty hackish, needs a lot of cleanup.

Edit the file to with your actual key. Then create an instance of AzureTranslator, set properties for the src and dest languages, and the phrase to translate. Call getTranslateByCurl() and it will return your translated phrase.

class AccessTokenAuthentication {

function getTokens2($clientKey, $authUrl){
try {
//Initialize the Curl Session.
$ch = curl_init();
//Set the Curl URL.
curl_setopt($ch, CURLOPT_URL, $authUrl . '?Subscription-Key=' . $clientKey);
//Set HTTP POST Request.
curl_setopt($ch, CURLOPT_POST, TRUE);
//Set data to POST in HTTP "POST" Operation.
curl_setopt($ch, CURLOPT_POSTFIELDS, ""); // $paramArr);
//CURLOPT_RETURNTRANSFER- TRUE to return the transfer as a string of the return value of curl_exec().
//CURLOPT_SSL_VERIFYPEER- Set FALSE to stop cURL from verifying the peer's certificate.
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
//Execute the cURL session.
$strResponse = curl_exec($ch);
//Get the Error Code returned by Curl.
$curlErrno = curl_errno($ch);
$curlError = curl_error($ch);
throw new Exception($curlError);
//Close the Curl Session.
return $strResponse ;
} catch (Exception $e) {
return ""; // echo "Exception-".$e->getMessage();

* Class:AzureTranslator
* Processing the translator request.
Class AzureTranslator {

private $clientSecret = "";
private $authUrl = "https://api.cognitive.microsoft.com/sts/v1.0/issueToken";
private $phrase = null;
private $sourceLang = "";
private $targetLang = "";

public function setPhrase ($phrase = "")
$this->phrase = "";
if (!empty($phrase))
$this->phrase = trim($phrase);

public function setSourceLang ($sLang = "")
$this->sourceLang = "";
if (!empty($sLang))
$this->sourceLang = trim($sLang);

public function setTargetLang ($tLang = "")
$this->targetLang = "";
if (!empty($tLang))
$this->targetLang = trim($tLang);

public function getTranslateByCurl()
try {

//Create the AccessTokenAuthentication object.
$authObj = new AccessTokenAuthentication();

$accessToken = $authObj->getTokens2($this->clientSecret, $this->authUrl);
//Create the authorization Header string.
$authHeader = "Authorization: Bearer ". $accessToken;

$contentType = 'text/plain';
$category = 'general';

$params = "text=".urlencode($this->phrase)."&to=".$this->targetLang."&from=".$this->sourceLang;

$translateUrl = "http://api.microsofttranslator.com/v2/Http.svc/Translate?$params";

//Get the curlResponse.
$curlResponse = $this->curlRequest($translateUrl, $authHeader);

//Interprets a string of XML into an object.
$xmlObj = simplexml_load_string($curlResponse);
foreach((array)$xmlObj[0] as $val){
$translatedStr = $val;

return $translatedStr;
//return $curlResponse;

} catch (Exception $e) {
return "";
//return $e->getMessage();

* Create and execute the HTTP CURL request.
* @param string $url HTTP Url.
* @param string $authHeader Authorization Header string.
* @param string $postData Data to post.
* @return string.
function curlRequest($url, $authHeader, $postData=''){
//Initialize the Curl Session.
$ch = curl_init();
//Set the Curl url.
curl_setopt ($ch, CURLOPT_URL, $url);
//Set the HTTP HEADER Fields.
curl_setopt ($ch, CURLOPT_HTTPHEADER, array($authHeader,"Content-Type: text/xml"));
//CURLOPT_RETURNTRANSFER- TRUE to return the transfer as a string of the return value of curl_exec().
//CURLOPT_SSL_VERIFYPEER- Set FALSE to stop cURL from verifying the peer's certificate.
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, False);
if($postData) {
//Set HTTP POST Request.
curl_setopt($ch, CURLOPT_POST, TRUE);
//Set data to POST in HTTP "POST" Operation.
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
//Execute the cURL session.
$curlResponse = curl_exec($ch);
//Get the Error Code returned by Curl.
$curlErrno = curl_errno($ch);
if ($curlErrno) {
$curlError = curl_error($ch);
throw new Exception($curlError);
//Close a cURL session.
return $curlResponse;