This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> | |
<style> | |
body { | |
background-color: bisque; | |
} | |
#container { | |
position: relative; |
This file contains hidden or 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
<!doctype html> | |
<html lang="ja"> | |
<head> | |
<title>BBS</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"> | |
<link rel="stylesheet" media="all" href="/css/style.css"> | |
</head> | |
<body> | |
<h2>Chat App by Node.js!</h2> |
This file contains hidden or 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
- app | |
├- node_modules | |
├- package.json | |
├- src | |
│ ├- js | |
│ ├- scss | |
│ └- images | |
│ | |
└- dist | |
├- js |
This file contains hidden or 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 crypto = require('crypto') | |
const moment = require('moment') | |
const algorithm = 'aes-256-cbc' | |
const password = "xrandom-password-length-32-chars" | |
const iv = 'random-length-16' | |
const hash = encrypt('hoge') | |
function encrypt(text){ | |
const cipher = crypto.createCipheriv(algorithm,password,iv) | |
text += `\$${moment().unix()}` |
This file contains hidden or 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 readline = require('readline') | |
const reader = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout | |
}) | |
reader.on('line', line => { | |
if (line !== "fin") { | |
console.log(line) |
This file contains hidden or 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
# get repository information | |
query GetRep { | |
repository(name: "riot", owner: "riot") { | |
id | |
name | |
url | |
} | |
} | |
# get user information |
This file contains hidden or 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
// then-catch-final(then) | |
const taskA = () => { | |
console.log("Task A") | |
throw new Error("throw Error at taskA") | |
} | |
const taskB = () => { | |
console.log("Task B") // does not be call | |
} | |
const onRejected = (error) => { | |
console.error(error) // => "throw Error at taskA" |