Monday, February 9, 2026

One Liner

 This could end up being a long thread of tips and tricks over time (or not).


I found myself needing to study a git repo in order to add a feature. I stumbled on the idea of finding recently created files that likely involved someone else (predecessor) adding a feature. So, how do you find a list of files ordered by creation date? Well, if you are deeply git and shell aware, you can probably sort that out. Or in the last few years, you can just ask whatever AI tool you are by default using in a browser to write the command for you:

find . -maxdepth 1 -type f -not -path '*/.*' | sed 's|^\./||' | while read -r file; do     if git ls-files --error-unmatch "$file" > /dev/null 2>&1; then         printf "%s | " "$(git log --diff-filter=A --follow --format="%ai | %an | %s" -- "$file" | tail -1)";         echo "$file";     fi; done | sort | column -t -s '|'

Syncing messages... again

 Google Fi (or maybe just Google) has yet again the way messages are synced between devices. However, this may actually be an improvement as it was done specifically for compatibility with that "other" phone ecosystem.

Unrelated, you can normally sync your iphone messages with your mac... unless your mac is corporately controlled and blocks this behavior. Ask me how I know.


Saturday, May 3, 2025

Syncing Google Fi Messages on Tablets

 This is a very hard thing to find so finally documenting here. When setting up a new Android tablet, to get messages to properly sync from Google Fi, you must open https://messages.google.com/web in Chrome and then go into the menu to right associated with that web page and scroll down to install on desktop. That's what makes the magic link from the messages app back into Fi.

Tuesday, April 23, 2024

Endorphins from Good Questions

 Does anyone else get a serotonin blast or endorphins when then generate a good question (to the web, to an expert, to a rando)?

Recently, I've had two unrelated experineces where I finally had generated enough context on a subject to generate good, actionable, valid questions that subsequently furthered my work and exploration of a new topic. It's such a jolt to my system that I love this.

I used to get the same kind of feelings (and neurochemical feedback) from completing a hard problem, or getting a program to run, etc. But these days, it's mostly just around generating a sufficiently good question that I'm no longer blocked in my work. Totally splendiferous.

I have nothing to link here sadly. It's just a blog post about feelings.

NOTE: I've had some of these sensations when working with Google AI and Microsoft Github Copilot. Asking great questions, i.e., prompting, is key to a useful productive interaction with these AI tools.

Tuesday, November 14, 2023

Restart the Mac menubar Dock etc to recover Mission Control

 I've switched to a Mac full-time a few months ago. One weird thing keeps occuring--I'm unable to make menubar selections (which I first notice actually with a keyboard shortcut: Ctrl-Up Arrow or Ctrl-Down Arrow). It's unclear why this happens but typically happens after connecting my mac to an external monitor and then waking it up (although the problem is not instantaneous at that point--it occurs shortly thereafter).

I've tried the normal tips to get the menubar to respond such as killing all Dock processes and similar.

What does appear to work is simply lifting the lid of my Mac. It triggers a "hard" redraw on all of the graphics and restores the menubar functionality and voila! the Mission Control features mentioned above resume proper functionality. (I immediately close the lid which triggers a 2nd redraw but you get the gist.)


Tuesday, April 4, 2023

Slack autohides channels now by default

 Slack also eliminated the ability to search for channel names (no idea why).

So, you need to ENABLE the "Show and sort" ALL button. And or enable Show.... All your conversations in the preferences.

Wednesday, January 4, 2023

A little K8s, Gitea, Helm, Postgres, stuff

 Had a discussion at work about what data gitea puts into postgres. Kind of a scaling/sizing discussion. Mainly, the stateful info needs to be stored and it's not especially dynamic. (That's my short take on the findings.)

I found via google some useful information on seblab's blog: https://blog.seblab.be/

and I'm sure there could be a lot more. I like the way seblab sets up a problem/situation and works it out.


  

Thursday, October 13, 2022

Stop finding semicolons and start finding plus signs.

 I frequently need to use the GNU find command to recursively look through a directory. Less often, I also need to execute a command on the results. There are two well documented ways to execute that command. 

The first is to pipe the output of find into xargs and run the command there. Here's an example.

find . -iname \*yaml -print0 | xargs -0 ls -alFhtr 

The second (and a bit handier if you can remember the proper invocation) is to just add an exec to the find command. I've historically used the find, exec, {} \; method. I've just studied up on that semicolon and along the way was exposed to the find exec {} + method. It doesn't require an escape character as bash (and other shells presumably) don't have a special meaning for +. And + actually means "clomp all the find results together and pass them into the command" which is particularly handy for date comparisons and for other reasons. So try this:

find . -iname \*yaml -exec ls -alFhtr {} +
And consequently, the flags to ls now sort the grouping of files by timestamp in reverse order (leaving the most recent yaml file at the bottom of the output (which is generally what I want).

Tuesday, August 30, 2022

helm knows what your kubernetes ConfigMap started with

 Today I asked my teammates how I might retrieve or recreate a missing ConfigMap. Our systems use helm to deploy ... deployments and one of the suggested this little gem:

helm get all -n namespace deploymentname  |tee deploymentname.yaml

Therein you will likely find the initial contents of the CM and can recreate it. (I just yanked out the rest of the yaml and then applied that file.)  

Tuesday, December 21, 2021

github ssh keys are finicky

 Okay, github uses some hash magic to figure out what account is affiliated with a particular ssh key. If you have two accounts using the same key, it has to guess (and does so poorly) about which user is trying to write.

Moreover, it tries keys somewhat sequentially. If the first in our ssh-agent (via ssh-add -L) is associated with a user, that's the only one it tries. If not, I believe it will go onto the next one (but again, if that second key is associated with multiple github users, it's going to hash to a specific user.) This is all because you can't tell github what user to use. De facto, the key is hashing to one and only one user and it ass/u/mes that is the user it will end up using.

But, the sad sad sad part is that it will not give you any more information.

You can set a specific "id" to use in our .ssh/config file like this:

Host github.com

Identityfile /home/USERNAME/.ssh/id_githubonly_rsa

 

 

Wednesday, October 27, 2021

elevator=none elevator=noop are both overcome by events

 You can't just pass in on the kernel commandline "elevator=none". If you do in ~5.3 or newer, you'll see:


[    0.105899] Kernel parameter elevator= does not have any effect anymore.

               Please use sysfs to set IO scheduler for individual devices.


Monday, April 5, 2021

xorriso is the bomb

 So, I wanted to remaster the SystemRescue iso. A trivial (20 character addition) was needed. I could not for the life of me figure out how to do this.

The answer (after 3-4 different multi-hour sessions trying to figure this out) was to use a tool called: xorriso. And to bear in mind that the iso itself needs to be bootable via an ISO or burnt CD/DVD as well as via UEFI and possible even via USB. This means it needs to be an everything bagel (so to speak). I found the "howto" for another distro and used that technique with the slight differences for the system rescue iso (which buries the efiboot.img under archiso since it is arch linux based.)

There was also this handy little guide re: xorriso. That was part of figuring this out. (I've always used genisoimage and friends prior to needing to remaster this.)

Thursday, April 1, 2021

ugly code that works

 I had the thought, "ugly code that works", as I finished a PR today. Project isn't technically open sourced (YET!) so I can't say much more but man, I worked sooooo long and hard on this trivial problem that I needed to vent.

The solution to the problem was to do something in cloud-init. Do the same thing in a systemd unit. And all of that was just to work around a sysctl issue. The solution is ugly code that works (in particular as it has a sleep 180 embedded in a script.) There is no reason in the world that I should be writing a systemd unit that calls a two line script where one line is sleep 180. But, there was no way to get the sysctl working with a systemd.path unit. (I tried, repeatedly.)

And the code works. I also then (after getting a merge) googled, "ugly code that works", and saw someone has already written this blog (though thankfully it wasn't me this time). See: https://dev.to/tonetheman/ugly-code-that-works-4i7l

"Do not be afraid to write ugly code that works." Also, don't be too surprised if it does break. Ugly code can be fragile also.

Wednesday, March 31, 2021

terraform is logical but not natural

The subject kind of says it all. If you can use environment variables (and you can and probably should) in terraform with the invocation/usage of TF_VAR_environment_variable_name, why in the ever loving world can you not do the same in modules (or sub-modules as I think of them)? Apparently environment variables don't propagate into the submodules.

So, you basically "re-declare" when you define/invoke the submodule. See: https://stackoverflow.com/questions/53853790/terraform-how-to-pass-environment-variables-to-sub-modules-in-terraform

In my case, I'm building "N" VMs in submodules and there is a "vms.tf" that has the "module "NAME" {} invocation (and of course there are "N" of these) so I had to do something like:
module "FIRST" {variableone = var.variableone}
.
.
.
module "NTH" {variableone = var.variableone}

"N" times and then at the top level (main.tf or variables.tf) something like:

variable "variableone" {
  description = "Cascade environment variable in terraform"
  default = ""

}

and then
export variableone="myvaluegoeshere"

in my environment.

Monday, March 15, 2021

It's been a minute and a few years....

 So, I just noticed it's been a minute since I last posted. I typically only post things that I need to find again in the future--and apparently that's been less often lately.

Today, I needed to figure out WHY IN THE WORLD my LG 4K HDMI monitor was popping throughout the day. And, indeed I did, but first, how did I get here?

I am a longtime Ubuntu user. This machine was built with Ubuntu in 2017-11 and upgraded to LTS release in 2018. I do daily apt updates but recently bit the bullet and brought it up to 2020 LTS release. That went very well and I see a number of improvements. However, it also started making a LOUD popping noise that I couldn't tie to any particular user activity.

A bit of googling later and I found that it was likely related to snd_hda_intel module and its power_save settings. power_save defaults to 1 (on this machine and similar) as it is a laptop and power_save is a good thing for a laptop. However, 98% of the time, it is now running primarily as a desktop. You know, COVID-19 and nowhere to go....

I confirmed the issue by further googling and found my friend Major Hayden's post when I ran into this same thing: https://major.io/2019/03/04/stop-audio-pops-on-intel-hd-audio/ it has a better writeup, more detail etc. But I post here so that I can easily find this myself for future me. I also thanked past Major here: https://twitter.com/davidmedberry/status/1371588276176363521

Friday, October 25, 2019

Deja Vu All Over Again

I recently joined Cray Research, the supercomputer folk, after 1.5 years doing pre-sales engineering for a technology I love. However, I didn't actually love (nor even really like) sales itself. So I'm back to doing engineering.

Two days after Cray hired me, their merger with Hewlett Packard Enterprise (HPE) completed, so I'm back at HP (but now HPE). Most of the impact of that change occurs on January 1, 2020.

So not only the yogiberra-ism of "Deja Vu All Over Again" but also the godfather-ism of "When I thought I was out, they pull me back in."

Monday, July 1, 2019

ansible tower token authentication

Reminder to self mostly, when refreshing your memory about tokens, start with this page:
ansible authentication methods and tokens

I'll come back here when I have something more substantive to say about this. The PAT token is dead easy, straight-forward and has naught to do with Point After Try.

Friday, April 12, 2019

letsencrypt with certbot

Well, the title is the task I was trying to accomplish but I kept getting an error. Turns out, the awscli in Ubuntu is seriously out of date. It gives an error like:
'AWSHTTPSConnection' object has no attribute 'server_hostname'
when using certbot (more on that below). The simple and easily googleable fix was to remove the ubuntu awscli package and pip install a newer version:
sudo apt-get remove awscli
pip install --upgrade awscli
I'd recommend doing that pip install in a venv (python virtual environment), especially if you have other "cloud tools" installed that way.

Now, why was I doing this and what does the title really mean? Most websites these days need to have an "SSL Cert" that is a signature by a certification authority. Really folks, you need to be doing this these days. Many businesses will not let you browse to a site that has a self signed cert and won't let you browse to a non-https site at all. But this is super easy as Let's Encrypt and certbot do all the work. I merely followed the steps here:
https://hackernoon.com/easy-lets-encrypt-certificates-on-aws-79387767830b

(Make sure you have certbot installed first. Your OS may have it packaged or "brew install certbot" on a Mac.)

And as with all of my recent posts, this is just mostly so I won't spend another 1/2 day trying to remember or recreate this.

And in all fairness, there are also a number of Ansible playbooks and/or roles for doing this. Here's some info on that:
https://github.com/geerlingguy/ansible-role-certbot
https://docs.ansible.com/ansible/2.5/modules/letsencrypt_module.html 
https://docs.ansible.com/ansible/latest/modules/acme_account_module.html 
(Ansible letsencrypt module was renamed more generically as "ACME" as it actually uses ACME and Let's Encrypt adheres to that web standard.)

Saturday, February 23, 2019

More fun with Ansible

I've been in an Ansible Solutions Architect (SA) role at Red Hat for about a year, but I still learn new things about Ansible every day.

When I explored ARA I first became familiar with Ansible Callbacks (that get called at the conclusion of tasks, plays, etc.) And I've been needing to make some modifications (filters, etc) to the PLAY RECAP at the end of an Ansible play. Note that there are numerous callbacks pre-written listed here, but occasionally you need to write a custom one. In this case, I just wanted a better understanding of what those pre-written ones can do. And, lo and behold, there's a nicely documented page that shows you that.

Thank you Random Hero.


Saturday, February 9, 2019

Weird tab behavior in Google Chrome

I run Chrome as my primary browser (so far) and it has never failed me. Yesterday however, I began to see a very strange behavior. As soon as I would click on any tab (other than the first tab), Chrome would start cycling down through the tabs. I.e., if I clicked on the 4th one, it would switch to that, then to the 3rd, then the 2nd, and finally the first tab (where it would remain.)

Switching to a new window (with only one tab) would work fine but as soon as another tab was opened, the same behavior.

Survived through reboots, chrome upgrades etc.

I think I have isolated this to either a funky (dirty?) keyboard or flakey mouse. Once I disconnected both the external keyboard and mouse, things returned to normal. Now doing the bisect to see if mouse or keyboard. One note: My kitchen has been under renovation for the last month. Consequently, I've done a lot more "eating over the keyboard" than normal, so maybe I just dropped some weird crumb that effectively doees control-pageup repeatedly (or some other previous tab command over and over.) I didn't notice this behavior in other "tab oriented" programs (such as gnome terminal or Firefox.)

Updates here if I further resolve this.

Oh and some search terms in case anyone else runs into this:
ubuntu
chrome
chrome-beta
(occurred in both)
tab switching
autotab switching
tab bug
google chrome tab bug
google chrome tab autoswitching bug

(Oh and for those playing along at home: restarted chrome numerous times, disabled all extensions, rebooted, upgraded Chrome, upgraded all Ubuntu packages--basically did all the "best practices" I could think of to work around this. The only work around seems to be disconnecting mouse and keyboard (which were plugged into a USB C dongle providing legacy USB connections.) System is HP Spectre x360 15" touch with 8th gen i7 running Ubuntu 18.04.2

Mouse seems to be working fine.

Blew some dust/gunk/ick out of my keyboard and now everything seems to be working again. (The peripherals are attached in the same order, same location.) So LIKELY the keyboard? The world may never know (and I'm sure the world will never care.)