I have a list of objects and I want to rewrite them with a prefix and suffix. I couldn't find a good example so I had to work it out myself.


awk '{ for (i = 1; i <= NF; i++) { printf "prefix-" $i "-suffix " } print}'

Audio stopped working after I upgraded from 34 to 35.

I had pipewire, but also had pulseaudio.

This link gave the secret sauce:

 $ sudo dnf swap --allowerasing pipewire-pulseaudio pulseaudio 

Had to logout and log back in, but after that, audio was back to normal.

Recent update changed the event name for Axis events, so I had to update my mousemapper script

https://github.com/uphillian/wayland-mouse-mapper

The Axis changed from -15 +15 to -15/120.* +15/120.* so I had to update the expansion in bash to %%\.* to remove all the extra stuff.

New version seems to work alright so far.  I hardcoded my mouse device this time.

 

Backstory

I bought a Pandora Box and was playing with it for a while, but didn't like that I couldn't add games myself.  So I replaced the Pandora board with a Raspberry Pi 4.

I wired up the joysticks using the GPIO pinout from https://github.com/recalbox/mk_arcade_joystick_rpi

The Pandora uses a 40 pin connector, so I purchased a 40 pin breakout cable to rewrite the 40 pin to the GPIO on the Pi.

https://smile.amazon.com/gp/product/B01EV70C78/

While setting up some cluster machines to run masterless I ran into this bug.  I had a directory structure like this:

code
  module1
    manifests
  module2
    modules
      module3
        manifests

 When running puppet apply with the modulepath code:code/module1/modules I ran into this error, specifically using the logrotate module.

Error: Evaluation Error: Resource type not found Logrotate::Size (file: code/modules/logrotate/manifests/conf.pp, line: 32, column:12)

I updated my private key and added the public key to the authorized_keys on my target hosts and it didn't work.  I ran a few verbose connections to see that the key was being sent, but not accepted.

Turns out the old version of ssh on this server doesn't generate the public key from the private key, it reads the id_rsa.pub file to send the public key.  Since this public key doesn't match what's in authorized_keys, I was denied.

The solution was to delete the public key.  Alternatively, you can generate the public key with ssh-keygen.

I gave a talk on processes and made some simple shortcuts to show processes matching patterns.

psg

ps - grep, grep the process listing for something and show the parent pid, sort by pid.

function psg() {
  thing=$1
  sort=$2
  if [ -z $2 ]; then
    sort='pid'
  fi
  ps -eo 'pid ppid stat cmd' --sort $sort| awk 'NR==1 {print}; /$thing/ && !/awk "NR==1/ {print}'
}

psgi

ps - grep case insensitive.

I just got a new laptop with Secure Boot and was having trouble getting Windows and Fedora installed in a dual boot configuration.  I read a few posts on how to do it by changing the bios to Legacy mode but that didn't seem like much fun.  Fedora 30 installed to secure with no problem, so I knew it was possible.

I started by paritioning the disk with a GPT partition table and the following partitions:

For reasons I'm running vagrant with VirtualBox inside a docker container.  Most of the time this goes great and no problems, but when it fails it's difficult to see what's happening on the machine.  I've tried and failed to get VNC going on the vm running inside the container. I should note that my problem is with Windows VMs, with Linux VMs it's never a problem to get console. My workaround for Windows is to use screenshots and send keystrokes to the vm via vboxmanage.

First step is to get the uuid or name of the vm