Desktop Notification When Command Finished (MacOS)

If you have some one-off command you’re running a lot and it takes a long time┬áto complete, you can use the native notification system in MacOS via command-line Applescript access to send yourself a notification once the command is done:

osascript -e 'display notification "DONE" with title "Command Done"'

I setup a bash alias so I can easily append this whenever I need:

alias notify_me="osascript -e 'display notification \"DONE\" with title \"Command Done\"'"

And then…

What Was Ruby Compiled With?

If you ever need to see the compile-time options for Ruby (–configure input), use this command:

$ ruby -rrbconfig -e "puts RbConfig::CONFIG['configure_args']"
 '--prefix=/Users/graham/.rbenv/versions/2.3.1' '--with-openssl-dir=/usr/local/opt/openssl' '--with-readline-dir=/usr/local/opt/readline' 'CC=clang' 'CFLAGS= -O3 -Wno-error=shorten-64-to-32 ' 'LDFLAGS=-L/Users/graham/.rbenv/versions/2.3.1/lib ' 'CPPFLAGS=-I/Users/graham/.rbenv/versions/2.3.1/include '