- elm
npm install -g elm- elm-test
| " augroup reload_talk_vimrc | |
| " autocmd! | |
| " autocmd BufWritePost *.vimrc source ~/dev/talk.vimrc | |
| " augroup END | |
| " ================ General Config ================ | |
| set nocompatible | |
| syntax enable | |
| set encoding=utf-8 |
| function! CustomGoFmt() | |
| let file = expand('%') | |
| silent execute "!gofmt -w " . file | |
| edit! | |
| set filetype = go | |
| endfunction | |
| command! CustomGoFmt call CustomGoFmt() | |
| augroup go_autocmd | |
| autocmd BufWritePost *.go CustomGoFmt |
| #!/bin/bash | |
| # To run like this: | |
| # ./run.sh foo.py | |
| # | |
| # If you have `entr` installed, you can build and preview on change: | |
| # ls *.py | entr -p ./run.sh /_ | |
| # | |
| set -e |
| const wc = () => Array.from(document.querySelectorAll('.view-lines div span span')).map(e => e.innerText.split(/\s/)).flat().filter(x => /\w+/.test(x)).length | |
| setInterval(() => { document.querySelector('.save-text.in-page').innerText = wc() + ' words' }, 5000) |