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
| git branch --verbose --verbose | grep ': gone] ' | sed 's/^ *\| *$//' | cut --fields=1 --delimiter=" " | xargs git branch --delete --force |
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
| document.body.addEventListener('keydown', event => { | |
| if (event.key === 'Tab' && event.target.tagName === 'TEXTAREA') { | |
| document.execCommand('insertText', /* ShowDefaultUI = */ false, ' '); | |
| event.preventDefault(); | |
| } | |
| }); |
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
| docker-compose up -d --build --force-recreate --remove-orphans && docker-compose logs -f |
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
| .env |
- Raftという分散合意アルゴリズムの紹介
- 論文: In Search of an Understandable Consensus ALgorithm (Extended Version)
- Raft三日目くらいの人が自分の理解をもとに(適当に)書いています
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 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 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
| docker network inspect $(docker network ls -q) | grep -E "Subnet|Name" |
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
| 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; | |
| }); |
NewerOlder