Stanley Meng

OS: Ubuntu 20.04

While following RVM: Ruby Version Manager — Installing RVM to install RVM, got the following error:

curl: (77) error setting certificate verify locations:
CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs

I tried a few ways around, but didn’t fix. Finally this one works for me.

$ sudo apt reinstall ca-certificates
$ sudo update-ca-certificates

The second command is important. I ran the first command first, but the problem didn’t fix, so I thought ca-certificates package was fine. Then I went with other posts which kind of wasting lots of time.

Then, finally, I realized I have to run the second command too.



For instance, you have a parameter in the template:

"EnableWebServer": {
"Default": "No",
"Description": "Enable Web Server in the Ubuntu or not",
"Type": "String"

You want to pass it to the Shell Scripts in UserData to run some commands based on this parameter. Here is an sample:

"UserData": {
"Fn::Base64": {
"Fn::Join": [
"#!/bin/bash -xe\n",
"if [[ \"Yes\" == ",
"Ref": "EnableWebServer"
" ]]; then ",
"echo yes > /tmp/1.txt; ",
"else ",
"echo no > /tmp/1.txt;",



Maybe I should consider github for this kind of document…uh…anyway, let me go with Medium.

  • How many files are modified in the local repo, but with only file name
git ls-files -m | wc -l
  • Compare files in different branches
git diff <branch name a>:<file path>  <branch name b>:<file path>