Skip to content

Instantly share code, notes, and snippets.

View codeaholicguy's full-sized avatar
🎯
Focusing

Nguyễn Nhật Hoàng codeaholicguy

🎯
Focusing
View GitHub Profile
const Notions = {
1: 'Thousand',
2: 'Million',
3: 'Billion',
}
const UnderTwenty = {
0: '',
1: 'One',
2: 'Two',
const w = {
100: 'Hundred',
1000: 'Thousand',
1000000: 'Million',
1000000000: 'Billion'
}
const ww = {
1: 'One',
2: 'Two',
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:
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}"`);
{
"success": {
"total": 1
},
"contents": {
"quotes": [
{
"quote": "Ideas don't get smaller when they're shared, they get bigger.",
"length": "61",
"author": "Seth Godin",
{
"fbPageId": "1093212670720847",
"campaign": {
"id": 1,
"pageId": 4,
"name": "Test campaign",
"description": "Test campaign",
"campaignGroupId": null,
"launchAt": null,
"isNewsLetter": true,
{
contents: [
{
id: 1,
order: 1,
text: 'Xin chào',
links: []
},
{
id: 2,
version: "3"
services:
app:
build: .
ports:
- "3000:3000"
environment:
- MONGO_URL=mongodb://mongo:27017
depends_on:
- mongo
version: "3"
services:
app:
build: .
ports:
- "3000:3000"
environment:
- MONGO_URL=mongodb://mongo:27017
depends_on:
- mongo
FROM node:8
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
COPY package*.json ./
RUN npm install
# Copy app source code