lsof is a helpful tool for looking at what files a process currently has open, however sometimes a process may only access a file for a second and
lsof may miss the moment.
For OSX we also have Instruments. This is included with XCode and is pretty straight forward to use:
- Open Instruments
- Select File Activity
- Select the process
- Hit Record
- Perform your action
- Stop Recording
You can also save the log for later analysis.
I use MacOS screen sharing to power pair programming sessions that I have in my development team. There are two modes for the navigator to use when observing the driver's screen (assuming that the screen being shared is of the driver): Observe Mode to disallow taking control of the screen, or a self-explanatory Control Mode.
I like being in Observe Mode as the navigator so that I don't mistakingly take control of the driver's screen and start polluting the screen with accidental key strokes. But if I ever need to switch control, I would have to then make a mouse click on the correct icon. This gets annoying if I am observing in Full Screen mode (which is almost always). I would have to exit full screen mode first in order to switch to taking control.
SOLUTION: I can instead use the CMD-ALT-X key combination to quickly switch control mode :D
If you have the code point of a Unicode character, it is possible to enter these characters into (almost) any program on Mac OSX, by first jumping through a few hoops:
- Open Language & Region.
- At the bottom right, open Keyboard Preferences...
- Click the plus sign at the bottom left to add a new Input Source.
- Under the Others category, select the Unicode Hex Input source.
- Check the Show Input menu in menu bar option.
You should now see a country flag in your menu bar, which will allow you to switch between different Input Sources (e.g. Canadian English, U.S, Unicode Hex Input). Whenever you want to enter Unicode characters, switch to the Unicode Hex Input source.
Now, you can hold down ⌥ (Option/Alt) and enter your code point to type Unicode characters. For instance, the ⌥ character has code point 2325 and can be entered by holding Option and entering
I use the slack app on my Mac, but it keeps replacing double dashes with an emdash.
e.g. --stat becomes —stat
In the slack app (and many other apps I presume?), right-click the field that has the problem, and turn off this option:
Substitutions -> Smart Dashes
Open Alfred Preferences -> Features -> Web Search -> Add Custom Search
Usage: Open Alfred search, type
Over the course of development on a project, there are many common jobs that one may run on a daily basis, such as:
- Starting a Rails app and watching a log tail
- Running a Zeus server and monitoring its status
- Monitoring RSpec output
- Keeping an IRB session open for quick experiments
I like to have a consistent workspace and layout that I can assume is readily available, as opposed to hunting down multiple terminal windows on my desktop. iTerm2 happens to provide a built-in mechanism for preserving workspaces and layouts.
Once you have all of your iTerm2 panes, windows, and tabs arranged to your liking, you can hit ⌘⇧s (Command-Shift-S) to Save and name your arrangement.
The next time you start iTerm2, you can Restore your saved layout by pressing ⌘⇧r (Command-Shift-R).
Option-click the Notification Menu icon to toggle OS X notifications. The icon is most likely in the top right hand corner of your menu bar.