Safely syncing your git fork to an upstream master

Well there are about a million commands you can use to do this, but the notes on unfortunately create merges which are bad, bad when you are trying to maintain things, here is what they suggest:

  1. Fork from the repo, for example if you have a repo `` to pick on the really cool solarized repo and you want to make a fork to say `` just choose fork from the so called upstream.
  2. Now on at the command line, you can clone your own repo with git clone
  3. Now cd solarized to get into that new repo
  4. From here you can now create your now branches, say git checkout -b rich-skinned if you want to say add your own custom skin.

Now here comes the tricky part, how do you first make sure your origin/master that is your fork is up to date:

  1. First you want to declare the upstream with git remote add upstream which gives your local repo two places to push things origin which is your fork and upstream which is the source of your fork.
  2. Now when you want to sync your fork, the best command is to first git fetch upstream --prune which your local machine with all the data in https://altercation/solarized and also git fetch -prune which does the same for your fork’s in the cloud master.
  3. Then you can sync it with git rebase upstream/master which says take all your changes and put them at the top of the upstream/master, you should then need to do a git push -f to fork the change as it is rewriting the history but you will not have merges and you will not have rebase problems by doing this.
  4. After you do this, you may want to simplify your many commits with git rebase upstream/master -i because this will put in an interactive dialog and you can squash various commits together and fix the edit names. If these look good then git push -f will commit the rewrite to your branch and you are up to date with upstream/master
  5. If you also want you can
    As an aside this makes it easy to do a pull request when you need to update the upstream because all your changes “bubble” to the top and then it is easy to do pull requests.


iPhone X fast wired and wireless charging

Ok this is actually pretty hard to decipher but here’s the scoop:

  1. Apple finally supposed USB C Power Delivery. This means that with a USB C to lightening cable it can vary the voltage and amperage.
  2. The shipped system is a USB A to lightening cable and adapter that charges at 5V at 1A so 5 Watts.

  3. If you get the Apple USB C to lightening cable you should get the fastest speeds according to iMore which is strange but it is what test results show. Note that you need a direct connection to make it work.

  4. The good news is that you can use non Apple chargers as well. Any USB C charger that is 29w or more should do a good job. So for your kit bag you want a cheap third party USB C car charger and USB C 29 watt charger. These can double as backup chargers if you have a MacBook 2016 or later. So the $59 Apple one has international compatibility with swappable plugs but if you don’t need it then the $22 iClever work well and is small.

  5. Titanium


Using Veracrypt and MacOS

OK, I love Veracrypt, it is a very nice tool for running encrypted volumes on your system. On the Mac though, it uses MacFuse underneath and you can run into not having enough file system slots to run it. You will get a cryptic message like:

mount_osxfuse: File System is Not Available (255)

Thank goodness for the internet, but OSX Fuse explains that there are limited slots and that if your have VirtualBox and OSX Fuse running on macOS Sierra, you can run into trouble.

On High Sierra things are bit a worse, so the steps are to look at what kext you have loaded with kextstat | grep -v which looks for non Apple kernel extensions and see things that could be about the file system.

In this case I had to unload VirtualBox since we use VMware Fusion, but I needed one more slot and saw that sometime I had loaded ExpressVPN and it had expressvpn.tun taking up a slot, so you run sudo kextunload -b expressvpn.tun and it loads.

ExpressVPN cannot just be deleted it turns out, you have to run an uninstall program (See

Indoor air quality monitors

If you have someone at home that has allergies or other health issues, it’s nice to be able to track. There are a host of startups and home devices that track this and let you see them in the cloud or on your phone:

  • PM2.5. These are the small particles that get past your defenses. Ideally, you should have filtered air, 2.5 micron particulate
  • PM10. If there are molds or other things in the air, then you should know about them. This standard for 10 micron particulate.
  • VOC. Volatile Organic Compounds such a Formaldehyde are also detected.
  • CO. Carbon monoxide. The classic leaking stove problem.
  • CO2. Carbon dioxide.
  • Humidity. High humidity plus high PM2.5 count could mean mold is in the house.

There are not many good quantitative reviews, but CleanTechnica did a nice set comparing the major brands, but here’s the summary:

  1. Foobot. This has the best in terms of software and and also sensors and calibration. It is nice because it has PM2.5 and VOC but also wifi access and IFTTT integration so you can get alerts and control other things as well. $199 on Amazon

There are some others that are just coming like:

  • uHoo. $270 and it has one Ozone as well and mobile apps.
  • Airvisual. This is mainly a PM2 and CO2 monitor and has a fantastic crowdsourcing system for monitoring outdoor PM2. Also $270 Direct. But it doesn’t have VOC.


Qi Chargers and not losing AirPods

Wow it is so cool the world is finally converging on Qi Charging (and USB C), we are near the grand unification. The idea that a phone never needs to be plugged in is nearly here with Air Pods (as long as you don’t lose them) and putting charging pads everywhere.

So here’s the scoop on the standard but as usual there are some considerations:

  • Charging rate. The normal Qi charging is 5 watts (so same as the normal iPhone battery charger), but there is of course a faster one coming at 7.5 and also 10 watts The  iPhone X/8/8S will support 7.5 watts, but you probably want one to future proof. Also at some point Apple will ship their AirPad which will allow iPhone, AirPod and Apple Watch wireless charging, that would be great. To use 10 watts, you need a USB port that supports Qualcomm QuickCharge 3.0. So look for that.
  • Number of coils. The very nice RAVPower for instance is 10 watts, but is single coil which means you have to be careful about how you position your phone. You can have as many as three coils which means you don’t have to position the phone exactly.
  • Thin case, you have to have a very thin case for these to work and you can’t use cases that hold credit cards on the back. Have to find another solution for those.

Net, net here are the things to try:

  • Car charger. I love the RAM X Mount because they are sturdy and expensive, but they really work. I look for a Qi charger for the car, but none of them had good reviews and the arms didn’t look very sturdy. So instead right now I think I need to see if you can just take a standard Qi charger and put it behind the X-mount. So trying a small thing charger that is just 0.14 inches or 4mm and attach it with tape and see how it goes. The main issue is making sure the charger is in the right spot from Mega
  • RAVPower. Because it is highly rated and works up to 10 watts.

So what’s to be done about AirPods and not losing the darn things. One set fell out of my bag the first time I’ve traveled, so the first thing is religiously put them into their case and then make sure the case is locked into something:

  • Keychain ring for the AirPod case. This is a $10 gizmo that let’s you attach the case and therefore the AirPods to something in your backpack.
  • VIMVIP AirPod Strap. This is a little magnetic cord so that you have some place to put your AirPods. That way if you need to take them out, you don’t just drop them and forget about them.

The final piece of the puzzle is to get something that charges all this stuff and your Apple Watch too. Get this really nice integrated battery pack with USB A and also an Apple Watch charger.


Minimizing Travel time with a Tesla (and Bolt)

Ok this is probably pretty obvious to Tesla geeks, but it took me some time playing with to really understand how to minimize the time you spend waiting around. The big things are to minimize the power consumption


You really want to draft behind big cars and realize that going from 75mph to 80mph for instance really increase power consumption, sometimes it is better to go 75 mph behind a big pickup then 80 mph by yourself because you will just have to spend more time at the charing station.

The same is true with hills, these cruise controls are really a little bit silly because in an electric car, it can definitely pay to do 55 mph up hill and limit your draw to say 30Kw and the go down hill at 75 mph where the draw is 10Kw particularly behind a truck.

At home before a trip tickle charge up to 100%, then during the trip visit a super charger when you get down to 10% and then charge in 40 minutes up to 80%. This will minimize your time and visits to the charger.

If you have a short trip and can make it home, then the last visit can be from 10% to 50% which will take 20 minutes.

The Details

As Teslapedia explains:

  1. You want to start with a full charge at home using trickle charging because that last 10% is super slow
  2. You want to be at a minimum charge consistent with safety, so the lower the better. Tesla recommends 12% remaining and 15% is considered a lot. For a 100KwH battery, you get use bout 333 kWh per mile or you get about 3 miles/KwH.  Translating all of this 12% is 12KwH or about 36 miles or range left.  They recommend a maximum of 15% for minimum time spent charging. We use 20% because having 60 miles left feels more comfortable 🙂
  3. You do not want to be next to any other Teslas. That’s because the A and B station actually share 140Kw, so if you are next to another “hungry” Tesla you won’t get your 120Kw maximum
  4. You then want to charge quickly. The rules of thumb are that it below 10% to 25% you get the full 120Kw maximum will take only 12 minutes that is it adds ?!. That’s why you want to get the charge down as low as you are comfortable.
  5. The charge then tapers off so if you want to go from 25% to 50% it will take an 28 minutes, get the picture, it is really slowing down.
  6. Then from 50-80% if will take another 30 minutes. The net is that you get a huge bang from buck from 10 to 25% and then you should only get what you need up to 80%. That is just just enough to get you to your destination with a reserve (eg 20%).
  7. Then it slows down, you should not charge more than 80% at a Supercharger because it is a waste of time, so the game is to go down to 12% and then back up to 50-80% each time and this will minimize the time at super chargers.

The actual curve is a little complicated but from some actual data, you can see how the charge rate seems to fall roughly linearly between 50 to 90% falling dramatically from 115Kw to 30Kw. Then you see there is an even steeper curve for the last 10% falling from 30 to zero.

Note that charging here shows a much lower curve at the beginning, that’s because this was done in Indiana when it was cold. The battery is optimal at 70 degrees F so look at the top curve as what you would get in normal temperatures.

But what about the Bolt? About the same strategy

Well where we live there are very, very, very few Fast DC chargers, so I’ve never had a chance to use one. But Bro9999 has done some research and the results are similar if slower:

  • Most CCS stations are 50kW maximum and when the Bolt battery gets to 75F, then you should see 46kW/125Amps (this is actually).
  • At 50% SOC it tapers down to 38kW/100 Amps and then at 70% to 24kW/60 Amps, so the same rule applies, you really want to keep it in the 10% reserve (24 miles) to 50% range to minimize charging time. Note that the Bolt at 239 miles and the Tesla X 100D at 289 miles have about the same range, so this translates into 28 mile reserve going to 140 miles, so you can go about 100 miles. This takes about 30 minutes which is essentially the same as the Tesla (28 minutes).

Net, net the numbers are basically about half which makes sense given that the Tesla has a 100Kwh battery vs 60Kwh in the Bolt and the charging speeds are about half at 115Kw vs 46kW and the taper points are similar.

However, given that there are few CCS and these cost money (compared with the charge is free for the Tesla X), most of the time it makes sense for the Bolt to stay in the 239 mile range and home charger at 7.2kW (240/30 amps) which is the maximum for the Bolt onboard AC charger. The recharge time is typically overnight.

At destinations, it makes sense to either find a free Level 2 charger at universities or to buy the $400 (even with a $160 discount it is pricey) Level 2 to Tesla adapter this handy gizmo has a Tesla receptacle on one end and a Level 2 CCS on the other.

International travel adapters

The main thing as The Wirecutter points out is to get adapters which are solid. I’ve lost all kinds of electronics because there is arcing across the plugs. So you really want a set that is durable and really plugs right in.

The big decision is whether you should get 3-prong which are safer, but are not as common overseas. The Bestek three prong system seems top rated both at The Wirecutter and Amazon.

The main thing to do is to zero in on the type of adapter that you need and just get the minimum. While these all-in-one adapters seem great, the reality is that they are big and they don’t connect as well to the wall. Ceptics seems to have the best two prong systems.

So you should look up where you are traveling look up the various plugs in different countries at and you will see that that if you can get away with two prongs. Most electronics use two prongs, you can sometimes get away with very few adapters.

As an example in Vietnam, they have Type B, C and D plugs. Type B is the American standards. Type C is the two prong Euro plug. But if you look at, most iPhone USB chargers are Type A, which is two prong, so that will fit in Type B. And Type C is European, but Type D is Indian but is compatible with a Type C two prong.

Net, net, it may seem like you need lots of adapters but if you go to Vietnam, you only need a really good Type C European adapter.

If you look at China, there’s a similar minimization. They have Type B, C and I. In this case you just need a Type C European and a Type I Australian and you should be set.

Greater Goods Wifi Scale and IOT Madness

Wow, it’s a good thing I’ve spent time working with Raspberry Pi’s because these wifi connected devices that try to be consumer friendly are really a nightmare, here’s a set of notes on this particular product. Note that it is not their fault, it is so common for these problems to crop up:

  1. The Greater Goods scale does not like long passwords or special characters. Both are needed to keep wifi networks secure, there is no documentation, but some gentle testing seems to show most special characters are not allowed and it looks like there is a maximum 12 character limit. Yikes. Probably due to the firmware they have bought from somewhere else. I’ve had lots of wifi cameras with the same problems.
  2. The diagnostics are basically non existent, if you have a failure they say try again or buy a travel router which basically creates a subnet for the device. It  looks some trial and error, but this is how the things works.
  3. First you push the button on the back to get it into setup mode, then you tell your phones to look for it and enter the wifi password there and then it tries to access the internet. If it fails, automatically shows an error then immediately turns itself off, so make sure to stare at the thing intently so you can see the error message.
  4. When it is trying, it shows a digit code for each entry (why this scale doesn’t use a touch screen, I don’t know with full led display, but I guess that’s how they saved some dollars, note to the makers, I think going to $99 for the scale and putting enough UI into it will really help sales!). But basically, 1 means the hardware is good, 2 means that I have SSID access, 3 means I’m at the internet and 4 means I found the Greater Good servers. So what happens is that it gets stuck. There doesn’t appear to be a hard reset, so you have to just keep trying and eventually the firmware concludes it doesn’t work and waits at 1, which is waiting for the SSID.
  5. You will also get super obscure error messages, but there is a decoder ring at the bottom of the setup page. The common ones are l212 which means you need to try to configure the AP again and t206 which basically means a bad wifi password. Again, you have to be quick to see these things.
  6. You can actually check to see what is going on, but this needs some magic. There are three nearly invisible buttons just below the display, if you hold the up arrow on the left for three seconds you end up in diagnostic mode. Then there is an invisible button right in the middle between the up and down arrow, click on that and it will try the 4 step access the internet so you can see where it is failing.

So here is how to safely put a wifi scale on your network so it has internet access but can’t see the rest of your network.

  1. You definitely do not want this device on your core home network, I’m sure there are zillion exploits, so here is what to do.
  2. First get a decent wifi access point system that allows guest networking. I use the Unifi, but other semi-pro systems should allow it. You want to create a dedicated wifi network for these not very safe devices and give them the dumb password.
  3. Then you need to isolate them from the rest of the network. With Unifi, this is really hard, but you basically need to create a network and make it a “guest” network.
  4. In the guest network, you want to make sure that network restrictions is on and that you disable your entire home network. For instance, the blanket, will keep most home networks private. This way they can only access the internet.

Seeing a Photos in one windows with Preview

This has been driving me crazy for years. But Preview has an idea about groups of photos, so if you open up a subset and then later a bigger set of photos, it opens multiple windows. The fix is pretty easy as Daily Motion points out, just start Preview and go into the settings and choose Images ‘When Opening Files:’ then pick ‘Open all files in one window’