next.js, nginx, reverse-proxy, ssl
$ sudo apt-get update
$ sudo apt-get install nginx letsencrypt
const express = require('express'); | |
const line = require('@line/bot-sdk'); | |
require('dotenv').config(); | |
const app = express(); | |
const config = { | |
channelAccessToken: process.env.channelAccessToken, | |
channelSecret: process.env.channelSecret |
{ | |
"events": [ | |
{ | |
"replyToken": "nHuyWiB7yP5Zw52FIkcQobQuGDXCTA", | |
"type": "message", | |
"timestamp": 1462629479859, | |
"source": { | |
"type": "user", | |
"userId": "U206d25c2ea6bd87c17655609a1c37cb8" | |
}, |
const express = require('express'); | |
const line = require('@line/bot-sdk'); | |
require('dotenv').config(); | |
const app = express(); | |
const config = { | |
channelAccessToken: process.env.channelAccessToken, | |
channelSecret: process.env.channelSecret |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.EventSystems; | |
using UnityEngine.Events; | |
using System; | |
public class LongPress : MonoBehaviour, IPointerDownHandler, IPointerUpHandler, IPointerExitHandler | |
{ | |
[Tooltip("Time before the long press triggered")] |
const fs = require('fs'); | |
fs.readFile('input', 'utf8', (err, contents) => { | |
console.log(contents); | |
const data = parseData(contents); | |
// console.log(data); | |
const result = findBestRoutePoint(data); | |
console.log(result); | |
}); |
const fs = require('fs'); | |
fs.readFile('input', 'utf8', (err, contents) => { | |
// console.log(contents); | |
const data = parseData(contents); | |
data.prices.sort((a, b) => a > b); | |
const result = solve(data.prices, data.m); | |
console.log(result); | |
}); |
void main() { | |
x(); | |
} | |
void x() { | |
final stream = Stream.periodic(const Duration(seconds: 1), (i) => i * i) | |
.take(5); | |
final subscription = stream.listen((x) { | |
print(x); |
void main() { | |
x(); | |
} | |
void x() { | |
final stream = Stream.periodic(const Duration(seconds: 1), (i) => i * i) | |
.take(5); | |
final subscription = stream.listen((x) { | |
print(x); |
r := gin.New() | |
// CORS | |
r.Use(middlewares.Cors()) | |
r.Use(ginrus.Ginrus(loggers.LoggerImpl, time.RFC3339, true)) | |
// Recovery middleware | |
r.Use(gin.Recovery()) | |
/* --------------------------- Public routes --------------------------- */ |