(macOS+Bash) Find All Locations Of A Binary Using `type’ not `which’

I can’t find the git 2.10 binary so I run

which git
/usr/local/bin/git

Excellent, found it.

And then I check it’s version to verify I am looking at the right version

/usr/local/bin/git --version
git version 2.15.1

Oops that isn’t what I wanted.

There must be another git getting loaded earlier in the search path.

Here is how to find out where all copies of git live

type -a git
git is /usr/local/bin/git
git is /usr/local/bin/git
git is /usr/bin/git

Look for the right git at version 2.10

/usr/local/bin/git --version
/usr/bin/git --version
git version 2.15.1
git version 2.10.1 (Apple Git-78)

I want the second one.

That is how to track down the location of a binary file on macOS that appears multiple times in the search path.

(PDF) Re-OCR A PDF Using PDFPenPro

Sometimes I want to recreate the OCR layer in a PDF using PDFPenPro but the menu item is greyed out.

Here is how force a re-scan:

  1. Hold down COMMAND+OPTION
  2. And then click Edit → OCR Document

If you open the menu first like I did, then the menu item remains greyed out, oops 😮😢.

PDFPenPro is in the top five list of best software that I’ve ever used. Check it out.

(macOS) Manage Multiple Snippets Of Copied Text With Your Clipboard With Flycut

After using it for a few days I already love it.

Personal examples:

  • I have a document open, and I want copy a few parts from it, into an email. But I don’t want to have to command-tab between the document and the email. So I just comand-c… and then go to my email. I do that all the time.
  • When I care about something that I am reading, a phrase, a word, and I want to remember it… maybe. So, the copy buffer is persistent, and I can go back anytime and look up what I may wanted to use.

Flycut: It’ll Remember It For You (but not Wholesale ).

If you are an Emacser you’ll instantly know and love this as a macOS Kill Ring.

Security concern: persisting sensitive information in your clipboard like this, it is easy to forget about it. Fortunately Flycut doesn’t copy values from password fields. Additionally it keeps it’s data local to your computer never sharing it between your other computers or devices. However, it is just like any other security concern so be careful what you keep in there.

Fix For When Bash Can’t Find Its Debugger On macOS

Sometimes Bash needs its debugger but it can’t find it. It looks like this:

/usr/share/bashdb/bashdb-main.inc: No such file or directory
-bash: warning: cannot start debugger

For example when you start bashdb yourself with bash --debugger or set shopt -s extdebug. Another example is when your terminal turns it on.

Here is the fix that worked on my box:

brew install bashdb
bashhome=$(brew --prefix bash)
bdbhome=$(brew --prefix bashdb)
ln -s $bdbhome/share/bashdb $bashhome/share/bashdb
unset bashhome
unset bdbhome

Making Sense of git-flow

Vincent’s Git workflow is powerful and simple. So it is the best one for most of us. When you tell somebody that you aren’t using it then they expect a pretty convincing explanation why not. There isn’t much to make sense of really.

gitflow-avh is the easiest way to use it. I tried doing it manually but it is easier to use the plugin. Here are some of the differences if you want compare the plugin with doing it manually. It is worth trying out manually if you want to appreciate the plugin, maybe.

This and this cheat-sheet aren’t all you need to know but they are a fine start.

Screencasting Practice & Feedback: 00004

Plan

  • Evaluate sound-dampening foam
  • Record the audio and video simultaneously in a conversational style and edit the video to fit the time-line
    • Love conversational style; curious about how to reduce it to the core content

Execution

Preparation

  • Minimal

Execution

  • Spoke more loudly

Post Production

  • Minimal
    • Added logo
    • Sped up video content to make it fit the time-line or removed some

Outcome & Feedback

  • Spent only 2 hours and I’m happy with the result
  • Conversation (audio and video) were recorded separately from the content. It is difficult not to synchronize them but rather to make them work well together. In this screencast, the content more or less makes sense. I think that I could do it better.
  • Weighing the balance between getting the content out there in an imperfect form versus planning forever and rarely publishing anything.
  • Missed light misplacement hilariously causing humongous eyebrows