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
| package main | |
| import ( | |
| "fmt" | |
| "bufio" | |
| "os" | |
| ) | |
| func read_input() *[]string{ | |
| sc:=bufio.NewScanner(os.Stdin) | |
| var lines []string |
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
| {"安らぎ":"00", | |
| "為す":"01", | |
| "移る":"02", | |
| "育み":"03", | |
| "育む":"04", | |
| "引き":"05", | |
| "引き継が":"06", | |
| "引き裂く":"07", | |
| "羽ばたき":"08", | |
| "渦巻く":"09", |
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
| sed -i 's/#Port 22/Port 443/' /etc/ssh/sshd_config | |
| systemctl restart sshd |
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
| import { db } from '@/plugins/vuefire.js' | |
| import { firebaseMutations,firebaseAction } from 'vuexfire' | |
| export default { | |
| state: { | |
| todos: [], | |
| }, | |
| mutations: { | |
| addTodo(state,todo){ | |
| state.todos.push(todo) |
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 run -it alpine echo Hello,World | |
| the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty' | |
| $ echo 'console.log("Hello,world")' | node | |
| stdin is not a tty |
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
| $ cat <(sed '1s/^/_=/' sample.big.json) <(echo 'JSON.stringify(_.docs.slice(0,3).map(v=>v._id),null,"\t")') | node -p - | |
| [ | |
| "14cd7192b2d699a606bde01c3123c750", | |
| "14cd7192b2d699a606bde01c3123d685", | |
| "14cd7192b2d699a606bde01c3123ddd4" | |
| ] |
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
| $ ffmpeg -i in.mp4 -vf "scale=iw/3:ih/3" -r 10 out.gif |
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
| p = pdfjslib.getdocument("https://mozilla.github.io/pdf.js/web/compressed.tracemonkey-pldi-09.pdf").then(pdf=>{ | |
| console.log('ok!') | |
| window.pdf = pdf | |
| pdf.getpage(1).then(page=>{ | |
| window.page = page | |
| console.log("======================") | |
| window.text = page.gettextcontent() | |
| }) | |
| }) |
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
| $ seq 0 5 | xargs -n1 -i date -d+{}days -I | |
| # formatや基準日を変えたいときは | |
| $ seq 1 10 | xargs -n1 -i date -d2017/01/01+{}days +%Y%m%d |
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 run -v $PWD:/usr/src/`basename $PWD` -w /usr/src/`basename $PWD` -it ubuntu |
NewerOlder