unable to launch go app, github.com/gorilla/mux

Wanting to test out a sample API app from swagger.io using golang on CentOS7 and found the simple start not so simple. The short answer is that is required git to pull the required packages from github to compile the program.

This host was a fairly new CentOS7 host with very few installed packages. I wanted to work with the pets api sample from swagger.io using golang. But as you can see below it failed to launch.

unable to find package for gorilla/mux.
trying to install gorilla/mux directly.

So I tried to install gorilla/mux directly and noticed that it was not able to pull the package from github. This made me wonder if I had git installed, I did not. Simple solution simple fix?

sudo yum install git -y

Yes, simple fix, after that it was really simple again.

Screen time controls not working

This week it seemed like the screen time controls I had in place were not working as expected. The phone I provided to my son was supposed to limit his screen time to about 2.5 hours a day but it sure felt like he had gone over that limit.

I checked went to check what sort of time reporting I had for his phone and noticed that it seemed to show very little detail, in fact, it seemed to have stopped reporting anything in the past week.

I could see this by going to Settings -> Screen Time -> selecting his name and looking under the daily average. It showed the last update date as a week prior and a small circle was spinning as if to tell me it was trying to update.

The solution was to toggle the “Ask to Buy” option found under Settings -> My name (top of the screen) -> Family Sharing -> His name (under Family Members) -> Ask To Buy. Here disable the option, go back once, return and re-enable the option. Once enabled his phone immediately got a message saying that Screen time was enabled. I also saw an update on for his screen time usage. As expected on a few days it had gone past the 2.5-hour limit. Now that it is enabled we will see how well it works.

Family sharing disabled apple Face ID setup

I have recently provided my son with an iPhone and in the process enabled some of the typical parental controls. In addition during the setup, I skipped over the Face ID setup assuming it would be simple to complete later and it should be his face and not mine used for this feature.

FaceID & Passcode
Where did it go?

Anyway, later when trying to find the Face ID option it appeared to be missing. I could find the section for Face ID but nothing about setup or resetting this feature. The issue is based on if you allow your child the ability “Passcode Changes”. When this feature is disabled the menu item on your child’s phone for “FaceID and Passcode” will be removed.

So, on your phone go to Settings -> Screen Time -> Content & Privacy Restrictions -> Passcode Changes. Here select either Allow (FaceID and Passcode will show) or Don’t Allow (FaceID and Passcode will NOT show).

It is also worth noting that you can now have more than one FaceID assigned to the phone. So, I could have set up FaceID with my image to start with but I still would have had this issue later when he tried to add his own image to FaceID.

Firewall-cmd cheat sheet

As I find myself infrequently changing firewall rules I often have to look up the syntax again and these tips cover 90% of what I want to do.

Get zone details; here is a quick reminder on how to find the default zone, find the active zone and finally list all the current rules.

firewall-cmd --get-default-zone
firewall-cmd --get-active-zone
firewall-cmd --list-all

Adding rules for https traffic

firewall-cmd --get-default-zone
firewall-cmd --zone=public --permanent --add-service=https
firewall-cmd --reload
firewall-cmd --zone=public --list-all

Adding rules for port 53 tcp

firewall-cmd --get-default-zone
firewall-cmd --zone=public --permanent --add-port=53/tcp
firewall-cmd --reload
firewall-cmd --zone=public --list-all

tail me some less…

One of my favorite tricks when using less is the ability to switch to a data stream in a log file or any file that might have dynamic content being added

  1. Typically I open the file in question using less then, review as required.
    here you use your standard Vi related navigation tricks.
  2. Move to the bottom of the file using SHIFT + g
  3. Switch to data stream mode using SHIFT + f
  4. Once you want to exit from the data stream use CTRL + c to quit
  5. Return to navigating around the file using the Vi style commands
  6. Finally exit the file
  7. Ask yourself if you will need tail -f much longer…

Stop Network Manager overwriting resolv.conf

Arg.. I updated /etc/resolv.conf and later after a reboot or restarting my network services NetworkManager pulls out my updates. So to stop this here is what have found works for me.

  1. Update /etc/resolv.conf as I wish
  2. edit NewtworkManager.conf
    sudo vi /etc/NetworkManager/NetworkManager.conf
  3. add dns=none under [main]
  4. restart NetworkManager to ensure my /etc/resolv.conf is left alone
  5. Wonder why I didn’t sort this out sooner 🙂