Skip to content

Instantly share code, notes, and snippets.

View Porrapat's full-sized avatar

Porrapat Petchdamrongskul Porrapat

View GitHub Profile
API_KEY=
curl -s -H "X-CMC_PRO_API_KEY: $API_KEY" -H "Accept: application/json" -d "start=1&limit=5000&convert=USD" -G https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest > result.json
cat result.json | jq '.data[0].symbol'
cat result.json | jq '.data[0].quote.USD.price'
echo ""
cat result.json | jq '.data[1].symbol'
cat result.json | jq '.data[1].quote.USD.price'
echo ""
cat result.json | jq '.data[2].symbol'
AUTH_KEY=
SENDER_NAME=
MOBILE=
TEXT="HELLO TEST LINE 1\nHELLO TEST LINE 2"
# Basic Implementation
curl -X POST -H "Content-Type: application/json" \
-H "Authorization: $AUTH_KEY" \
-d "{\"from\":\"$SENDER_NAME\",\"to\":\"$MOBILE\",\"text\":\"$TEXT\"}" \
AUTH_KEY=
APP_ID=
MESSAGE_TEMPLATE_ID=
SENDER_NAME=
MOBILE=
curl -X POST -H "Content-Type: application/json" \
-H "Authorization: $AUTH_KEY" \
-d "{\"applicationId\":\"$APP_ID\",\"messageId\":\"$MESSAGE_TEMPLATE_ID\",\"from\":\"$SENDER_NAME\",\"to\":\"$MOBILE\"}" \
# To use : add your line notify api token
LINE_NOTIFY_ACCESS_TOKEN=
# Provide your multiline text. We use shell script heredoc syntax here.
MESSAGE=$(cat << END_HEREDOC
HELLO LINE 1
HELLO LINE 2
END_HEREDOC
)
# To use : add your slack oauth access api token
SLACK_API_OAUTH_ACCESS_TOKEN=
# Provide your slack channel
SLACK_CHANNEL=
# Provide your text
TEXT=
curl -s -X POST -d "token=$SLACK_API_OAUTH_ACCESS_TOKEN&channel=$SLACK_CHANNEL&text=$TEXT&pretty=1" "https://slack.com/api/chat.postMessage" > /dev/null
# How to use
# Make sure you install curl. By running curl -v to test it.
# Provide your Gmail username and password and who you need to send email to.
# For password it is not your Gmail password but it is App passwords https://support.google.com/mail/answer/185833. Please go to your Gmail account setting and create it.
# chmod -R 777 send-email-gmail.com
# ./send-email-gmail.com
# Your Gmail username (email) (Required)
SENDER_GMAIL_USERNAME=
# Your App password (Required)
# How to use
# Make sure you install curl. By running curl -v to test it.
# Provide your Gmail username and password and who you need to send email to.
# For password it is not your Gmail password but it is App passwords https://support.google.com/mail/answer/185833. Please go to your Gmail account setting and create it.
# chmod -R 777 send-email-gmail-thai.com
# ./send-email-gmail-thai.com
# Your Gmail username (email) (Required)
SENDER_GMAIL_USERNAME=
# Your App password (Required)
# ============ Login K-Bank ========================
# To Use provide your username and password
# chmod -R 777 login_k-bank.sh
# ./login_k-bank.sh
# Please provide your username and password here
# This is not the best choice to use this script. because your password is saved on your machine and transfer through script
# Please consider K-Bank Open API instead https://apiportal.kasikornbank.com/open-api/
username=
password=
# ============ Login SCB ========================
# To Use provide your username and password
# chmod -R 777 login_scb.sh
# ./login_scb.sh
# Please provide your username and password on https://www.scbeasy.com/
username=
password=
# Please Specify Your cookie file (Any blank text file is OK.)
# Link on bank website using gotted
# Please provide SESSIONEASY variable and cookie_file you previously captured
# chmod -R 777 login_scb_using_got_info.sh
# ./
statement_url=https://www.scbeasy.com/online/easynet/page/acc/acc_mpg.aspx
SESSIONEASY=
cookie_file=
echo "SESSIONEASY IS : $SESSIONEASY"