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 express = require("express"); | |
const app = express(); | |
//使用するポートを指定する。 | |
const port = 8080; | |
const server = app.listen(port, () => { | |
// ポート設定時に実行される処理 | |
console.log(`Node.js is listening to PORT: ${ server.address().port }`); | |
}); | |
app.listen(2020); // 複数ポートの指定も可。 |
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
#!/bin/bash | |
#yum install | |
cd ~ | |
sudo yum install -y wget vim | |
#alias | |
cd ~ | |
echo "alias ll='ls -la'" >> ~/.bashrc | |
source ./.bashrc |
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
require('fs').readFile('./vol.31/indent.txt','utf8',(err, text) => console.log(text.split("\n").map((v,i,a) => v[0] === "*" ? `${ a[i-1].replace(/\*.*/, "") }${ v }` : v).join("\n"))) |
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
[...Array(20)].map((v,i) => [...Array(20)].slice(2).map((u, i) => i + 3).reduce((pV,num) => pV.some((pn) => !(num % pn)) ? pV : [...pV, num], [ 2 ]).some((v) => v === i +1 ) ? [...Array(20)].fill('*').map((v,ii) => ii === i ? '@' : '*').join('') : [...Array(20)].fill('*').join('')).join('\n') |
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
[...Array(1)].reduce(() => console.log(t([18], [24])), t = (v1, v2) => v1.some((v) => v2.some((vv) => vv === v)) ? v1.find((v) => v2.some((vv) => vv === v)) : t([...v1, v1[0]*(v1.length+1)], [...v2, v2[0]*(v2.length+1)])) |
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
require('fs').readFile('/etc/passwd','utf8',(e,t) => console.log(t.split("\n").map((v) => v.replace(/:\*:.*/, "")).filter((v) =>!!v).join("\n"))) |
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
require('fs').mkdir('./koi',() => [ ...[...Array(50)].map((v,i)=>i+1),'MT','Un'].forEach((v) => require('fs').mkdirSync(`./koi/chr${v}`))) |
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
require('fs').readFile('./bio-shell/data/merge-test-c.vcf',(e,t)=>console.log(`${t}`.split('\n').map((v) => (!v ||/^#/.test(v)) ? "" : (v.split("\t")[3].length < v.split("\t")[4].length && /1\/1/.test(v.split("\t")[9])) ? v : "").filter((v)=>!!v).join("\n"))) |
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
require('fs').readFile('./bio-shell/data/linda.txt',(e,t)=>console.log(`${t}`.split('\r\n').map((v) => (!v ||/^#/.test(v)) ? "" : v.split(",")[v.split(",").length - 2]).filter((v)=>!!v).join('\n'))); |
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
let categories; | |
const example = { | |
username: "user1", | |
categories: [ | |
{ | |
name: "namae1", | |
type: "type1" | |
}, | |
{ | |
name: "namae2", |