Skip to content

Instantly share code, notes, and snippets.

View moomdate's full-sized avatar
🍋
~/.profile

moomdate moomdate

🍋
~/.profile
  • bangkok
View GitHub Profile
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 {
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;
@moomdate
moomdate / _select_support_wallet.js
Created October 23, 2021 07:04
select support wallet
const walletList = [
{
"coin": "1INCH",
"de": true,
"we": true,
"dh": false,
"wh": false,
"name": "1inch",
"isLegal": false,
"trading": true,
@moomdate
moomdate / all.gs
Last active February 15, 2021 03:24
function doGet(e) {
doRequest();
}
function createTrigger(){
deleteAllTrigger()
ScriptApp.newTrigger("doRequest")
.timeBased()
.everyMinutes(5)
.create()
function doRequestAndCreateSchedule(){
createTrigger();
doRequest();
}
function createTrigger(){
deleteAllTrigger();
ScriptApp.newTrigger("doRequest")
.timeBased()
.after(5 * 60 * 1000)
.create();
}
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}`);
}
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",
function deleteAllTrigger() {
var triggers = ScriptApp.getProjectTriggers();
for (var i = 0; i < triggers.length; i++) {
ScriptApp.deleteTrigger(triggers[i]);
}
}
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)