drsjb80
Typically technical, occasionally informative
Saturday, October 17, 2026
Easy shortcut key in Nemo
Here's a VBA script for PowerPoint that counts the total number of slides in a presentation and places that count into a shape named "SlideTotal". Great for <#> out of so one can know how many slides are left. Why this isn't built into PowerPoint is beyond me.
Sub UpdateSlideTotal()
Dim totalBox As Shape
Dim total As String
total = CStr(ActivePresentation.Slides.Count)
On Error Resume Next
Set totalBox = ActivePresentation.SlideMaster.Shapes("SlideTotal")
On Error GoTo 0
If totalBox Is Nothing Then
MsgBox "Could not find a shape named SlideTotal."
Exit Sub
End If
totalBox.TextFrame.TextRange.Text = total
End Sub
Friday, September 12, 2025
Brother PT-P300BT printing Apple Command, Option, etc. symbols
I don't know who needs to hear this, but the way I was able to do this was edit a Note on my Mac, putting the symbols there, and reading the Note on my iPhone. I was then able to copy and paste from the Note to the Brother app. That seems more complicated than necessary to me.
Monday, May 19, 2025
Odd env behavior
This finds homebrew's bash.
$ env -vvv -P $PATH bash
#env verbosity now at 2
#env verbosity now at 3
#env Searching: '/Users/beatys/.rbenv/shims:/Users/beatys/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin:/Applications/Docker.app/Contents/Resources/bin'
#env for file: 'bash'
#env matched: '/opt/homebrew/bin/bash'
#env executing: /opt/homebrew/bin/bash
#env arg[0]= '/opt/homebrew/bin/bash'
This does not.
$ env -vvv bash
#env verbosity now at 2
#env verbosity now at 3
#env executing: bash
#env arg[0]= 'bash'
Huh. Looking at the code shows a line
ptr = __DECONST(char *, str); /* XXXX Yes, very dodgy */
I'm not sure that's related, but it is a big type hammer.
#ifndef __DECONST
#define __DECONST(type, var) ((type)(__uintptr_t)(const void *)(var))
#endif
Monday, July 19, 2021
Wazuh on Windows using docker
You can ignore the memory instructions athttps://documentation.wazuh.com/current/docker/wazuh-container.html and just bring up a git bash shell from https://git-scm.com/download/win
git clone https://github.com/wazuh/wazuh-docker.git - b v4.1.5 --depth=1
cd wazuh-docker
docker-compose up
You'll need to install an agent on the host and point it to localhost. Here's the command that the "Add agent" gives you for a privileged PowerShell:
Invoke-WebRequest -Uri https://packages.wazuh.com/4.x/windows/wazuh-agent-4.1.5-1.msi -OutFile wazuh-agent.msi; ./wazuh-agent.msi /q WAZUH_MANAGER='localhost' WAZUH_REGISTRATION_SERVER='localhost' WAZUH_AGENT_GROUP='default'
If the agent doesn't seem to register, do:
C:\Program Files (x86)\ossec-agent\agent-auth.exe' -m localhost
Check the log for errors etc via:
more 'C:\Program Files (x86)\ossec-agent\ossec.log'
If you need to remove an existing agent to try again, do:
msiexec.exe /x wazuh-agent.msi /qn
Tuesday, June 29, 2021
Wazuh on MacOS using docker.
https://documentation.wazuh.com/current/docker/wazuh-container.html
Works, but one has to use 127.0.0.1 for the host MacOS agent as docker for Mac only can listen to 127.0.0.1.
