August 6, 2015

Input \ instead of ¥ on Mac OS X Japanese

In order to input the backslash character "\" instead of "¥" on a Mac OS X system with Japanese keyboard settings, you should go to "System Preferences > Keyboard > Input Sources" then select the Japanese keyboard. Towards the bottom of the settings in the right pane change the setting for '"¥" key generates' to the value '\ (Backslash)'.

May 17, 2015

To make the function keys on Apple Keyboard work correctly in Ubuntu and its variants (Lubuntu, etc.), the following commands should be used to permanently set the corresponding "fnmode" property and update the configuration files:
>echo options hid_apple fnmode=2 | sudo tee -a /etc/modprobe.d/hid_apple.conf
>sudo update-initramfs -u -k all
You need to reboot after this for changes to take effect.
Reference: https://help.ubuntu.com/community/AppleKeyboard

February 23, 2015

Manually delete TimeMachine backups

Use the following command to manually delete TimeMachine backups (starting with Mac OS X Lion):
> sudo tmutil delete TimeMachine_BACKUP_NAME
Note: It is possible to delete backups of other machines than the current one.

January 27, 2015

Matlab 2013b crash at start-up

If Matlab 2013b crashes at start-up with the "java.lang.NullPointerException" error, one possible solution is to temporarily change the Mac OS X version number.

For this, change the ProductVersion value from e.g., 10.10.1 to 10.90 in the file "/System/Library/CoreServices/SystemVersion.plist".

This change can be reverted once Matlab starts (recommended, since changing the OS version seems to interfere with Safari, etc.).

Reference: http://mathworks.com/matlabcentral/newsreader/view_thread/336387

March 6, 2014

static linking in gcc

In order to force static linking in gcc/g++ you need to use the option
'-static'. However, unless you have installed in advance the static
versions of the glibc libraries you will receive an error such as:
> /usr/bin/ld: cannot find -lm

To install the static versions of the libraries, on RHEL variants for
instance, run:
> sudo yum install glibc-static