3/29/2018

Meta + E opens disk analyzer in Ubuntu instead of file explorer

Run this command to fix:
xdg-mime default nemo.desktop inode/directory

3/26/2018

How to install caffe2

Then follow the instructions here:
https://github.com/facebookresearch/Detectron/blob/master/INSTALL.md

How to fix the error:
/usr/local/include/eigen3/Eigen/Core:42:34: fatal error: math_functions.hpp: No such file or directory
compilation terminated.
CMake Error at caffe2_gpu_generated_arg_ops.cu.o.cmake:203 (message):
  Error generating

  /home/liangzou/gitcaffe2/caffe2/build/caffe2/CMakeFiles/caffe2_gpu.dir/operators/./caffe2_gpu_generated_arg_ops.cu.o

This is caused by a bug in Eigen. Use this version of Eigen to fix it:
//mirror.bazel.build/bitbucket.org/eigen/eigen/get/034b6c3e1017.tar.gz



3/07/2018

How to use a sniffer to check serial port stream data

sudo jpnevulator --ascii --timing-print --tty /dev/ttyUSB0 --read

1/31/2018

Firefox HiDPI support

about:config
Change layout.css.devPixelsPerPx to 1.7 for HiDPI

1/24/2018

Change FN key behavior on Ubuntu 16.04 installed on Macbook pro

Change Function Key behavior

This section of the document describe how to change the behavior of 'fn' key to better match what user expect. (See #201711, #162083)
Here a description of each behavior :
  • 0 = disabled : Disable the 'fn' key. Pressing 'fn'+'F8' will behave like you only press 'F8'
  • 1 = fkeyslast : Function keys are used as last key. Pressing 'F8' key will act as a special key. Pressing 'fn'+'F8' will behave like a F8.
  • 2 = fkeysfirst : Function keys are used as first key. Pressing 'F8' key will behave like a F8. Pressing 'fn'+'F8' will act as special key (play/pause).

Ubuntu 9.04 to 12.04 LTS (Precise Pangolin)

Temporarily

The following command will change the behaviour of 'fn' key with immediate effect, but restarting will reset the configuration:
$ echo 2 | sudo tee /sys/module/hid_apple/parameters/fnmode
(The meaning of fnmode values is as described in the preceding section.)

Permanently

Methods described in this section will change the behavior permanently. There are several ways to proceed with this modification. Each sub-section describes one way to permanently change the configuration.
With .conf file (Recommended)
1. Run the following command to append the configuration line to the file /etc/modprobe.d/hid_apple.conf creating it if necessary:
$ echo options hid_apple fnmode=2 | sudo tee -a /etc/modprobe.d/hid_apple.conf
2. Trigger copying the configuration into the initramfs bootfile.
$ sudo update-initramfs -u -k all
3. Optionally, reboot

$ sudo reboot

1/22/2018

How to change the blogger blog post font

There are limited fonts available to be selected in Blogger. If you want to use a special font, here is a trick you can use:

Copy and paste

haha

To HTML and switch back to Compose. Then you can use your desired fonts.

Font of Microsoft OneDrive Text or text editor

Apparently Microsoft OneDrive website font depends on your operating system's browser version.
I like to use the Consolas font for the display, but it always uses Courier New as the font for my Ubuntu/Linux Firefox browser.

The solution is to install User Agent Switcher in Firefox and use Windows/Firefox to enable the Consolas font.