This file contains 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 Notions = { | |
1: 'Thousand', | |
2: 'Million', | |
3: 'Billion', | |
} | |
const UnderTwenty = { | |
0: '', | |
1: 'One', | |
2: 'Two', |
This file contains 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 w = { | |
100: 'Hundred', | |
1000: 'Thousand', | |
1000000: 'Million', | |
1000000000: 'Billion' | |
} | |
const ww = { | |
1: 'One', | |
2: 'Two', |
This file contains 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
name: main | |
on: | |
# Cho phép chạy bằng tay từ giao diện Github | |
workflow_dispatch: | |
# Lên lịch chạy hàng ngày vào lúc 00:00 UTC | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: |
This file contains 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 axios = require("axios"); | |
const fs = require("fs"); | |
const getQuote = async () => { | |
try { | |
const { data } = await axios.get("https://quotes.rest/qod?language=en"); | |
const quote = data.contents.quotes[0].quote; | |
const author = data.contents.quotes[0].author; | |
console.log("new quote", `"${quote}"`); |
This file contains 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
{ | |
"success": { | |
"total": 1 | |
}, | |
"contents": { | |
"quotes": [ | |
{ | |
"quote": "Ideas don't get smaller when they're shared, they get bigger.", | |
"length": "61", | |
"author": "Seth Godin", |
This file contains 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
{ | |
"fbPageId": "1093212670720847", | |
"campaign": { | |
"id": 1, | |
"pageId": 4, | |
"name": "Test campaign", | |
"description": "Test campaign", | |
"campaignGroupId": null, | |
"launchAt": null, | |
"isNewsLetter": true, |
This file contains 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
{ | |
contents: [ | |
{ | |
id: 1, | |
order: 1, | |
text: 'Xin chào', | |
links: [] | |
}, | |
{ | |
id: 2, |
This file contains 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
version: "3" | |
services: | |
app: | |
build: . | |
ports: | |
- "3000:3000" | |
environment: | |
- MONGO_URL=mongodb://mongo:27017 | |
depends_on: | |
- mongo |
This file contains 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
version: "3" | |
services: | |
app: | |
build: . | |
ports: | |
- "3000:3000" | |
environment: | |
- MONGO_URL=mongodb://mongo:27017 | |
depends_on: | |
- mongo |
This file contains 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
FROM node:8 | |
# Create app directory | |
WORKDIR /usr/src/app | |
# Install app dependencies | |
COPY package*.json ./ | |
RUN npm install | |
# Copy app source code |
NewerOlder