Removing Passwords from Git Repos

For those who have accidentally committed passwords, api keys, etc to a guy repo, we have a great tool available to take care of it, BFG. BFG will remove those secrets from the entire git repository’s history, not just the most recent commit.

bfg --replace-text passwords.txt

git reflog expire --expire=now --all && git gc --prune=now --aggressive

Passwords.txt is just a line delimited list of passwords. Just don’t commit this to your repo

The tool is available here on github

Changing DNS Servers with NetworkManager

I’ve never used network manager before, and right now I have a need to change the DNS settings on a system of mine that just so happens to be using it. Let’s look at the commands to change the DNS servers using network manager.

To modify the DNS server settings, we’ll want to call the network manager CLI modify connection and input the DNS settings we want to change. For the terminal, this becomes “nmcli con mod”. We then give it the connection name, “ipv4.dns” argument, and a list of the DNS servers to set. The full command can be seen below.

nmcli con mod $connectionName ipv4.dns "8.8.8.8 8.8.4.4"

connectionName can be found by command: nmcli con. In the question case, it will be "System eth0"as always, after configuration changes, restart the service

As always, after configuration changes, restart the service

service NetworkManager restart

Now we should have our new DNS servers active for our network configuration.

Resources

Vxworks 6.9 Ping

I’ve started working with VXWorks now a bit, so I feel like providing some information in working in that sort of system/environment. Some of these will be short docs and some will be more in depth. Here we’ll look at the ping command.

ping("host to ping", "number of packets to receive", "options flag")

Setting options greater than 1 for printing out ping information. The list of options flags are below.

  • PING_OPT_SILENT 0x1
    • Work silently
  • PING_OPT_DONTROUTE 0x2
    • Don’t route
  • PING_OPT_DEBUG 0x3
    • Print debugging messages
  • PING_OPT_NOHOST 0x4
    • Suppress just lookup

Converting 3MF files to STL

We’ll be using Microsoft 3D builder for this conversion. Its a simple use of the tool but it works out well. Just open your .3mf file in Microsoft 3D builder, and save it back out as an STL. I’ve found this to be the easiest way as its all free software provided by MS.

It’s no simpler than opening the file in 3d builder, clicking save as, and saving it out as a new file type.

Release info change

Just about every time I update my unifi commissioner installation, I run into an error from apt about the updated codename. I should probably remember the flag by now to get past this, but I never do. Hopefully this blog post will jog my memory next time. The error is related to the repository changing it’s codename to update the version number. An example is shown below.

Repository 'x' changed it's 'Codename' value from'x' to 'y'

This must be accepted explicitly before updates for this repair can be applied. See apt-secure(8) manpage for details.

Getting around it is easy enough if you remember the apt flag, –allow-releaseinfo-change, that’s all that’s needed.

apt-get update --allow-releaseinfo-change

Using Qemu Tools

While moving virtual machines from my unraid NAS to my new proxmox node way back when, I ended up needing to use a few of the qemu-img tools. This is a toolset for handling virtual disks used by kvm/qemu.

Conversions

Something I hadn’t realized while using unraid as my kvm host was that it wasn’t always using qcow2 format, which was my go to format, despite that the webui saying that the file format was qcow2. There were also a few virtual machines I made that ended up in different forms, so to handle these, I ended up having to convert the machines using the following commands.

The first command is to convert from a raw image to a qcow2 file.

qemu-img convert -f raw - O qcow2 /path/to/file.img

The second command is to convert from a qcow to a qcow2 file.

qemu-img convert -f qcow2 -O qcow2 /path/to/img.qcow

File Information

The other command I made use of was the info command from the qemu-img tool. This gives out useful file information for the file input to the command.

qemu-img info

These are just some useful, small commands in the qemu toolbox that can help significantly when working with the VM disk files directly.

Controlling Media Volume with  a Rotary Encoder from ESPHome

The NFC Decks that I design and build have rotary encoders onboard. I added them to eventually use in a whole home audio setup, and now that I have some squeezelite speakers to control, I finally have something to use that part of my design on. Let’s take a look at how to control media volume with the rotary encoders.

Continue reading “Controlling Media Volume with  a Rotary Encoder from ESPHome”

Displaying Currently Playing Music Info

I have played with the MAX7219 display a few times in the past but never had a solid project in mind for it. With my whole home audio project though, I realized I can use it for a cool little display showing what’s currently playing on the system. I’ll want a slightly larger display to use for a final project, but for now I can play with the automations and back end setup for such a display.

Continue reading “Displaying Currently Playing Music Info”

Squeezebox ESP32 Multi-room Audio System

I finally came across a speaker setup that I could try out for relatively inexpensively, that also uses open source software, and can be used for multi-room audio. I found the ESP32 A1S audio kit that is supported by squeezelite-esp and has a simple web installer. On top of that, there are a decent number of forum posts using it and providing details on configuration. This gives me a potential holy grail, open source, locally based, multi-room audio speaker. The main problem I will end up having is putting something together with good audio quality, and appliance level ease of use and stability, but thats a future problem, for now, lets check out squeezelite on the ESP32 A1S.

Continue reading “Squeezebox ESP32 Multi-room Audio System”