3/17/2019

Setup SSH without password

How to setup SSH without password?

ssh-keygen -f ~/.ssh/id_rsa_aws
ssh-copy-id -i ~/.ssh/id_rsa_aws user@server


https://www.ssh.com/ssh/keygen/

2/12/2019

google-chrome cannot start on Ubuntu 16.04

Symptom:
Gkr-Message: secret service operation failed: The name org.freedesktop.secrets was not provided by any .service files

The chrome window doesn't show up.

Solution:
gnome-keyring was not installed. After installing it, the problem was solved.

11/09/2018

How to debug network issues

traceroute google.com
ping google.com
dhclient
ifconfig name up/down

10/22/2018

Stop cursor blinking

http://www.jurta.org/en/prog/noblink

For cygwin/mintty + emacs blinking cursor issue, it can be solved by:

To stop the cursor from blinking in Micro$oft Windows applications:

Or just navigate to Control Panel / Keyboard, and under "Cursor blink rate" move the slider all the way to the left.

For Google docs:
Install Stylebot extension:
Use:
.kix-cursor-caret {
    border-color: rgb(255,0,0);
border-width: 3px;
}

.kix-cursor {
    -webkit-animation-iteration-count: 0 !important; 
}

.docs-text-ui-cursor-blink {
  animation-name: none;
}

===
In Firefox, it's possible to type about:config in the url bar, and
create ui.caretBlinkTime with type integer and value 0.

===
For Qt5 applications: https://github.com/igogo/qt5noblink

===
For Mac:
defaults write -g NSTextInsertionPointBlinkPeriodOn -float 99999999
defaults write -g NSTextInsertionPointBlinkPeriodOff -float 99999999
defaults write -g NSTextInsertionPointBlinkPeriod -float 3600000


10/17/2018

How to get buildifier: the BAZEL BUILD file formatter

  1. Install Go:
Install Go Development Kit on Mac:
Install Go in ubuntu:
Follow    https://golang.org/doc/install#install
mkdir ~/go
    echo export GOPATH=${HOME}/go >> ~/.bashrc
    source ~/.bashrc
2. Install Buildifier by:
go get github.com/bazelbuild/buildtools/buildifier
This will put the buildifier in ~/go/bin/buildifier in mac, go/bin in ubuntu

6/10/2018

How to fix face of a girl by using photoshop

1. Use liquidify to fix the shape of the face
2. Use Alt + click to select a color and paint tool to cover some unwanted colors. Use dodge tool or burn tool to change the exposure of the touched areas.
3. Use the technique in this video: https://www.youtube.com/watch?v=Qw5dUVTmzro. To summarize: separate low frequency and high frequency.
To get low frequency: copy the layer and use Gaussian blur
To get high frequency: copy the layer | Image | Apply Image | select the low frequency layer, blending: substract, scale 2, offset 128. Then change the blending mode to Linear Light for the high frequency layer.
Done.