Tuesday, September 16, 2025

Diff of two pdf files

 Install on MacOS

 brew install diff-pdf

I used the follow for a visual diff:

diff-pdf --view earthscope-org-chart-2025-09_03_posted.pdf earthscope-org-chart-2025-09_12_posted.pdf

Wednesday, April 9, 2025

rsync screensaver pics

 Commands to rsync pics to my private server and back.

rsync -avz --checksum --dry-run --ignore-existing saver/ sbargy@bargabus.com:~/saver 

  • -a archive (lots of things including recursive)
  • -v verbose
  • -z compress on sync
  • --checksum use checksum for file comparison, not just size/date
The trailing / in first directory indicates use all files in that directory. 

Wednesday, April 2, 2025

Key-repeat suddenly stopped working in VSCode

 I had just fired up copilot and thought that was the cause.  I was editing a file in VSCode and had the Vim extension installed.  I use HJKL to move around a file, often holding down the key to move multiple lines.  It stopped working.  The K key would also pop up an Apple press and hold autocomplete suggestion that just contained a single k.

I removed the CoPilot extension and this behavior continued.  After much search, found this SO question.

This command turns off ApplePressAndHold for the VSCode application...

defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false

Set True to re-enable.

UPDATE:

Had the same issue with Windsurf/Codeium.  Tried the following

defaults write --app Windsurf.app ApplePressAndHoldEnabled -bool false

 The --app flag threw an error.  To find the Bundle ID of an application:

codesign -dr - /Applications/Windsurf.app

Executable=/Applications/Windsurf.app/Contents/MacOS/Electron
designated => identifier "com.exafunction.windsurf" and anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = "83Z2LHX6XW"


So, the following worked for Windsurf...

defaults write com.exafunction.windsurf ApplePressAndHoldEnabled -bool false

Monday, November 28, 2022

vi style line editing in csh

 This is the csh version of the "set -o vi" in bash...

bindkey -v

Thursday, July 7, 2022

Search for a filename in GitHub

 Search for a filename in GitHub (all repos in an account or a single repo) with:

filename:user.rb

Wednesday, February 9, 2022

Ignore whitespace in vimdiff

 Add the following to the vimdiff command line...

-c 'set diffopt+=iwhite'

Sunday, May 17, 2020

Mount OS/X samba share on Linux

sudo mount.cifs --verbose //192.168.1.11/scott bargamac/ -o user=scott,rw,vers=1.0