1/11/2017

Amazon AWS API C++ Segment Fault

The segment fault is usually caused by memory manage issues.
When I debugged my issue, I found that:
One class called "new S3Client", which is passed to a unique_ptr. However, when ShutdownAPI(options) function is called, the S3Client somehow gets destroyed. Then when the unique_ptr tries to destroy S3Client, a segment fault happened.
The fix is to put a section bracket {  } before calling ShutdownAPI so that the unique_ptr destroys the pointer before ShutdownAPI.

1/06/2017

How to change terminal cursor shape and color

For gnome-terminal:
Profile Preference | Cursor Shape (Prefer no blinking block)
Then:
Add "echo -ne '\e]12;#ff0000\a'" to change the color to red

To disable cursor blinking:
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:$(gsettings get org.gnome.Terminal.ProfilesList default|tr -d \')/ cursor-blink-mode off

To disable Ubuntu Cinnemon cursor blinking:
System settings | Keyboard Turn off text cursor blinks

For Putty:
Window | Appearance | Cursor Appearance: to change shape
Window | Colors | Cursor Color: to change the color  

For Google Docs: