Method | Result |
---|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Function to print colored messages | |
print_message() { | |
local color="$1" | |
local message="$2" | |
echo -e "${color}${message}\033[0m" | |
} | |
# Define colors |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function stockPrice(symbol) { | |
var now = Math.floor(Date.now() / 1000); | |
var threeDaysAgo = now - (3 * 24 * 60 * 60); | |
var url = 'https://services.entrade.com.vn/chart-api/v2/ohlcs/stock?from=' + threeDaysAgo + '&to=' + now + '&symbol=' + symbol + '&resolution=1D'; | |
Logger.log(url) | |
var headers = { | |
'accept': 'application/json, text/plain, */*', | |
'accept-language': 'en-US,en;q=0.9,vi-VN;q=0.8,vi;q=0.7', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-------------------------- | |
# Generate folder and file to take note every time I read a article | |
#-------------------------- | |
alias blog='cd /Users/foody/Documents/blogs;bash ./script.sh $1' | |
#-------------------------- | |
# Simulate notification push | |
#-------------------------- | |
alias pushnoti='xcrun simctl push 187777A4-9449-45F4-924D-0335854E8996' |