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
| package sha1; | |
| import java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStreamReader; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| public class Test2 { |
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
| package sha1; | |
| import java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStreamReader; | |
| import java.util.*; | |
| import java.util.stream.Collectors; | |
| import static java.util.stream.Collectors.groupingBy; |
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
| const walletList = [ | |
| { | |
| "coin": "1INCH", | |
| "de": true, | |
| "we": true, | |
| "dh": false, | |
| "wh": false, | |
| "name": "1inch", | |
| "isLegal": false, | |
| "trading": true, |
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 doGet(e) { | |
| doRequest(); | |
| } | |
| function createTrigger(){ | |
| deleteAllTrigger() | |
| ScriptApp.newTrigger("doRequest") | |
| .timeBased() | |
| .everyMinutes(5) | |
| .create() |
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 doRequestAndCreateSchedule(){ | |
| createTrigger(); | |
| doRequest(); | |
| } |
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 createTrigger(){ | |
| deleteAllTrigger(); | |
| ScriptApp.newTrigger("doRequest") | |
| .timeBased() | |
| .after(5 * 60 * 1000) | |
| .create(); | |
| } |
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 doRequest(){ | |
| var response = UrlFetchApp.fetch("https://api.bitkub.com/api/market/ticker"); | |
| var body = JSON.parse(response); | |
| const {last} = body.THB_XRP; | |
| if(last > 11){ | |
| // sendLineNotify(last); | |
| Logger.log(`push notification XRP: ${last}`); | |
| } | |
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 sendLineNotify(value) { | |
| var messages = { | |
| "message": `ราคา XRP น้อยกว่า 11, ราคาปัจจุบัน ${value}` | |
| }; | |
| var url = "https://notify-api.line.me/api/notify"; | |
| var token = "ใส่ line noti token"; | |
| var options = { | |
| "method": "post", |
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 deleteAllTrigger() { | |
| var triggers = ScriptApp.getProjectTriggers(); | |
| for (var i = 0; i < triggers.length; i++) { | |
| ScriptApp.deleteTrigger(triggers[i]); | |
| } | |
| } |
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
| let sum = 0; | |
| $("html body app-root app-layouts div app-history div div table tbody tr").each((d,i)=>{ | |
| sum += +i.lastElementChild.textContent | |
| }) | |
| console.log(sum) |