Notes

Here are some code snippets for my reference.

OSX

Stop media keys from launching iTunes:

launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist

matplotlib

Major and minor grid lines on semilogx plot:

ax = fig.gca()
ax.set_xscale('log', basex=10, subsx=np.arange(2,9,1))
ax.xaxis.grid(True, which='both')

Change font style:

from matplotlib import rc
font = {'family' : 'sans-serif',
        'sans-serif' : ['Arial'],
        'size'   : 22}
rc('font', **font)