Skip to content

Instantly share code, notes, and snippets.

View maximumbreak's full-sized avatar
💭
I may be slow to respond.

maximumbreak

💭
I may be slow to respond.
View GitHub Profile
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: {
cd goodbye && gcloud functions deploy GoodBye --runtime go111 --trigger-http
cd ../hello && gcloud functions deploy Hello --runtime go111 --trigger-http
cd goodbye && gcloud functions deploy GoodBye --runtime go111 --trigger-http
cd ../hello && gcloud functions deploy Hello --runtime go111 --trigger-http
package function
import (
"encoding/json"
"io/ioutil"
"net/http"
"time"
"github.com/dgrijalva/jwt-go"
)
{
"Code": 200,
"Message": "ข้อความจาก json ที่กรอกเข้ามา",
"Token" : "tokenkeystring"
}
{
"Code": 200,
"Message": "Goodbye BeforeSecond"
}
package function
import (
"encoding/json"
"net/http"
)
type Result struct {
Code int
Message string
@maximumbreak
maximumbreak / 01_basic.go
Created January 18, 2019 15:40 — forked from reagent/00_README.md
Custom HTTP Routing in Go
package main
import (
"io"
"log"
"net/http"
)
func main() {
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')
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");