Hidden Icon? files on macOS

Posted on Mon 15 June 2020 in programming • Tagged with macos

For a while I've tolerated files named Icon? that appear in my console ls and git status output on macOS as well as in some IDE file trees like in Atom:

$ \ls -Al
total 696
-rw-------  1 micahsmith  staff  179 Nov 12  2019 Experiment Datasets.gsheet
-rw-r--r--@ 1 micahsmith  staff …

Continue reading

Fixing invalid argument iwhite on vimdiff

Posted on Thu 07 November 2019 in programming • Tagged with vim, macos, catalina

[Update from 2020-03-27 below]

Vim's diff mode is a lightweight diffing tool that can be used at the command line, in particular with the git diff command. In a previous post, I wrote about configuring vimdiff as the git difftool for use with Matlab development (yes, way back when I …


Continue reading

Find ports in use on macOS

Posted on Mon 16 September 2019 in programming • Tagged with macos, shell

How to find ports that are already "in use" on macOS:

sudo lsof -P -i TCP -s TCP:LISTEN

This is helpful if you are trying to figure out which process is using a port so that you can kill that process — for example, if you have a web server …


Continue reading