About 10-15 years ago the power-bank came on the scene. People were carrying phones and other gadgets around that needed charging and were constantly worried about running out. As a consequence, if you offered them one with your logo, they would carry it around. Marketing objective achieved.

Fast forward to today. The gadgets now have ~3000mAh batteries, and better battery life. But the humble power bank hasn’t really kept up. You see, most of them are a single 18650 battery, usually used. Yes, used. This means that some crusty old laptop you had about 10 years ago that was thick enough to have a 6×18650 battery pack was ‘recycled’. Someone took it apart, took out those batteries that hardly held a charge, slapped it in some new plastic, and shipped it back.

Let’s take a look at one. I attended a conference in early December. The ‘swag bag’ that we were handed came with the de-rigeur ‘power bank’ and some sticker thing you put on the back of your phone to make it easier to hold. The power bank claims a (actually believable) 1200mAh capacity. Others are not so held by the truth and use words like ‘2000mAh’, or why not ‘200 000mAh’ 🙂

OK lets think about this. My phone (pixel 2xl) has a 3520mAh battery. This means, in a perfect world, I could get about 1/3 charge from this device. The Pixel 2 XL supports USB-C PD, it can charge ‘up to 7 hours of charge with 15min’ of a USB-C PD charger.

So, I have a choice, I can carry this widget, and, over the course of 1 hour of charging, transfer about 1/3 the of the capacity to the phone. Or, for about the same weight, I can carry a USB-C PD charger and turbo-charge it in about 5-minutes to the same amount. Hmm.

So lets do a bit of a trial, to see if this modest (and free) device holds up to its 1200mAh claim. I’m thinking it will, the cell in it new would have been ~2000-~3000 mAh, so used @ 1200mAh sounds ok (some losses will occur in the 3.6V – 5.0V boost circuit too).

Bust out the ‘meter’ and some resistors (and a fan). Here we are just after plugging in, 5.0V output @ 1.05A. Good!

And here we are 1:13:29 later, just before it shuts off. 1208mAh have been transferred to the device under charge. OK, story checks out, they spec’d it accurately.

But, would I carry this? No way. Its not longer good enough. If it was a ~20K mAh bank w/ USB-C PD then maybe. But that would be outside the $1 target cost to make a marketing give-away feasible.

So, marketers of the online universe… Save your $, and save the landfill, these are no longer ‘cool’ and no longer useful.

In December 2017 I predicted that 2018 would see a virus that transmitted malware via smart electric car chargers. Well… (good?) news everybody, its here. They only highlight one, an in-home charger, here by chargepoint.

Side note: that self-same charger I mentioned in Campbellville Court that was non-functional on Dec 17, 2017 was *still* not working on Dec 25th 2018. It just won’t negotiate charging w/ our car, given various faults. Progress… not.

So… malware that wanders around as you plug your car in. A device that is becoming self-driving, with tons of hi-res cameras that record everything around you and in your life.  A device that is big and heavy, and sadly, are being used in terrorist attacks. What could go wrong?

Anyone got a suggestion for this? Why would Cloudflare DNS be unable to resolve the SOA record of a given domain if Google DNS can? 9.9.9.9 can also resolve this without trouble. Its not a one-of either, it repeatedly refuses to answer, but does for other domains. Hmmm. Is this a disconnect between Cloudflare and .ca root? A caching issue in Cloudflare? Hmm. If we “$ dig @d.root-servers.net -t SOA 100years.ca” and then check each of the roots (c.ca-servers.ca etc), they all work from my house… Hmm.

$ dig @1.1.1.1 -t soa 100years.ca
 ...
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 63615
 ...

$ dig @8.8.8.8 -t soa 100years.ca
 ...
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 196

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;100years.ca.			IN	SOA

;; ANSWER SECTION:
100years.ca.		10799	IN	SOA	ns1.fastpark.net. hostmaster.100years.ca. 1545692000 28800 7200 604800 86400

Docker has a cache. This saves you a ton of time when the instructions haven’t changed. But sometimes it cannot tell if there’s a change, e.g. it may be doing a ‘pip install git+http://…’. If the package has changed, it doesn’t see that.

Sure you could ‘docker rmi’ a lot of times, like a caveman, but… There has to be a better way.

How about this:

ARG PLANTUML=git+https://${GIT_USER}:${GIT_TOKEN}@mypath@integration
ARG BUILD_FORCE=1
RUN pip3 install ${PLANTUML}

now add –build-arg BUILD_FORCE=$RANDOM to your docker build, and, every single time, this layer will rebuild.

Hah!

OK. We’ve all been there. We want to make one container that installs something from git that it is in another repo. But we don’t want to keep pushing that other repo.

Perhaps you want to do something like:

ADD ../other
RUN pip install ...

But, you get this cowardly failure: “Forbidden path outside the build context”. You search and find some idea about bind mount! But… its too smart for you now and still disallows.

Sure, you could copy the repo into the current directory, but why? Lets look at a Simple way to solve this.

  1. in the .git dir of the foreign repo, run git update-server-fino
  2. run python -m SimpleHTTPServer 8000
  3. use git+http://172.17.0.1:8000/ for the URL in e.g. pip install
  4. Profit!

Now you can co-develop these two things in peace.

peace out.