Generate a RootCA private key
openssl genrsa -out ca.key 2048
Generate a Cert from RootCA private key
openssl req -new -x509 -key ca.key -out ca.crt
curl -s https://sjc.com.vn/giavang/textContent.php | rg -A2 10L | rg -o '.{0,6},000' | |
#curl -s https://sjc.com.vn/giavang/textContent.php | grep -A2 10L | grep -oP '.{0,6},000' |
symbol=$(echo $1 | tr 'a-z' 'A-Z') | |
filter=".data.$symbol.name,.data.$symbol.quote.USD.price" | |
token=$(security find-generic-password -a "$USER" -s 'CMC_API_TOKEN' -w) | |
curl -s -H "X-CMC_PRO_API_KEY: $token" -H "Accept: application/json" -d "symbol=$symbol" "https://pro-api.coinmarketcap.com/v1/cryptocurrency/quotes/latest" -G | jq $filter | tee >(pbcopy) |