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
module.exports = { | |
LINE_TOKEN: 'linetoken input here', // ใส่ Channel access token | |
LINE_API: 'https://api.line.me/v2/bot/message', | |
FIREBASE: { | |
PROJECT_ID: 'projectId Firebase input here', // ใส่ projectId fore Firebase | |
KEY_PATH: './src/key.json' // ที่อยู่ของ key json ของ firebase ไฟล์ | |
}, | |
URL_COPY_PASSWORD: 'https://example.com/api/v1/copy?text=', // แก้ไข url ที่ deploy เพื่อใช้งานจริงได้เลย | |
URL_LOGO: 'https://images2.imgbox.com/7e/0b/Cz8AV24h_o.png', | |
BOT_MSG: { |
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
cd goodbye && gcloud functions deploy GoodBye --runtime go111 --trigger-http | |
cd ../hello && gcloud functions deploy Hello --runtime go111 --trigger-http |
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
cd goodbye && gcloud functions deploy GoodBye --runtime go111 --trigger-http | |
cd ../hello && gcloud functions deploy Hello --runtime go111 --trigger-http |
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 function | |
import ( | |
"encoding/json" | |
"io/ioutil" | |
"net/http" | |
"time" | |
"github.com/dgrijalva/jwt-go" | |
) |
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
{ | |
"Code": 200, | |
"Message": "ข้อความจาก json ที่กรอกเข้ามา", | |
"Token" : "tokenkeystring" | |
} |
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
{ | |
"Code": 200, | |
"Message": "Goodbye BeforeSecond" | |
} |
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 function | |
import ( | |
"encoding/json" | |
"net/http" | |
) | |
type Result struct { | |
Code int | |
Message string |
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 main | |
import ( | |
"io" | |
"log" | |
"net/http" | |
) | |
func main() { |
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 functions = require('firebase-functions') | |
const request = require('request-promise') | |
const LINE_MESSAGING_API = 'https://api.line.me/v2/bot/message' | |
const LINE_HEADER = { | |
'Content-Type': 'application/json', | |
Authorization: `Bearer {Authen Key Line}` //// ----> LINE Authentication Key (Channel access token) | |
} | |
let node_ssh = require('node-ssh') |
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 puppeteer = require("puppeteer"); | |
const delay = require("delay"); | |
async function main() { | |
const browser = await puppeteer.launch({ | |
headless: false | |
}); | |
const page = await browser.newPage(); | |
await page.goto("https://chilindo.com"); |
NewerOlder