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
document.body.addEventListener('keydown', event => { | |
if (event.key === 'Tab' && event.target.tagName === 'TEXTAREA') { | |
document.execCommand('insertText', /* ShowDefaultUI = */ false, ' '); | |
event.preventDefault(); | |
} | |
}); |
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
docker-compose up -d --build --force-recreate --remove-orphans && docker-compose logs -f |
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
.env |
- Raftという分散合意アルゴリズムの紹介
- 論文: In Search of an Understandable Consensus ALgorithm (Extended Version)
- Raft三日目くらいの人が自分の理解をもとに(適当に)書いています
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 net = require('net'); | |
const server = net.createServer(); | |
server.on('listening', () => { | |
const { | |
address, | |
port, | |
} = server.address(); | |
console.info(`Server started. (IP:port = ${address}:${port})`); |
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
docker network inspect $(docker network ls -q) | grep -E "Subnet|Name" |
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
document.querySelector('[class^="___player-display-footer___"]').addEventListener('wheel', evt => { | |
/* 回転方向:上 = +1(正), 下 = -1(負) */ | |
const sign = Math.sign(evt.wheelDelta); | |
const video = document.querySelector('video'); | |
video.currentTime -= 5 * sign; | |
}); |
$ winpty docker-compose.exe exec mariadb bash
root@5da26f38c385:/# mysqldump -u root <schema名> -p > /tmp/dump.sql
$ docker ps | grep -E "mariadb|IMAGE"
docker ps | grep -E "mariadb|IMAGE"
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5da26f38c385 mariadb:10.3.2 "docker-entrypoint.s…" 2 hours ago Up 2 hours 127.0.0.1:3306->3306/tcp xxxxxx_mariadb_1
NewerOlder