Skip to content

Instantly share code, notes, and snippets.

View trello_webhook.ts
export const webhookTrello = functions.region(REGION).https.onRequest( async(req, res) => {
const action = req.body.action
if(action && action.display.translationKey !== 'unknown') {
const data = {
action: action,
changeTime: Date.now() + 25200000,
}
const board = action.data.board
board.changeTime = Date.now() + 25200000
await firestore.collection('board').doc(action.data.board.id).set(board)
View dailynews_flex.json
{
"type": "bubble",
"size": "giga",
"body": {
"type": "box",
"layout": "vertical",
"contents": [
{
"type": "box",
"layout": "vertical",
View codelab_firestore.ts
import * as functions from 'firebase-functions';
import * as admin from 'firebase-admin';
admin.initializeApp();
const db = admin.firestore();
// Start writing Firebase Functions
// https://firebase.google.com/docs/functions/typescript
export const helloWorld = functions.https.onRequest((request, response) => {
functions.logger.info("Hello logs!", {structuredData: true});
View schema.json
{
"fields": [
{
"fields": [
{
"name": "id",
"type": "string"
},
{
"name": "text",
View ScheduleFunctions.js
const REGION = "asia-northeast1"
import * as functions from 'firebase-functions'
exports.importInsight = functions.region(REGION).pubsub.schedule('every 10 minutes').onRun((context) => {
})
View flex_graph.json
{
"type": "bubble",
"body": {
"type": "box",
"layout": "vertical",
"contents": [
{
"type": "text",
"text": "จำนวนผู้ติดเชื้อรายวัน",
"weight": "bold",
View flex_demo_bib_runner.json
{
"type": "flex",
"altText": "test",
"contents": {
"type": "bubble",
"body": {
"type": "box",
"layout": "vertical",
"contents": [
{
View PostTrack.json
{
"type": "bubble",
"size": "mega",
"header": {
"type": "box",
"layout": "vertical",
"contents": [
{
"type": "box",
"layout": "vertical",
View flex_receipt_old_style.json
{
"type": "bubble",
"size": "giga",
"body": {
"type": "box",
"layout": "vertical",
"contents": [
{
"type": "box",
"layout": "horizontal",