Glide is the easiest way to create useful slide for all of your Gists.
- input key
<-to go backward. - input key
->to go forward.
| fs = require 'fs' | |
| fs.readdir 'posts', (err, files)-> files.forEach (filename)-> fs.readFile "posts/#{filename}", (err, file)-> | |
| text = file.toString().split('\n') | |
| title = /title: "(.*)"/.exec(text[1])[1] | |
| output = [].concat(["# #{title}", ''], text.slice(7)).join('\n') | |
| fs.writeFile "posts/#{filename}", output, (err)-> if err? then console.log filename, err else console.log "convert success: #{filename}" |
| rank = (str, num)-> | |
| ary = str.split '' | |
| target = ary[num] | |
| ary.slice(num+1).reduce (sum, i)-> | |
| if i > target then sum + 1 else sum | |
| , 0 | |
| ans = rank "generating", 0 | |
| console.log ans |
| #cVim-link-container, .cVim-link-hint, #cVim-command-bar, #cVim-command-bar-mode, #cVim-command-bar-input, #cVim-command-bar-search-results, .cVim-completion-item, .cVim-completion-item .cVim-full, .cVim-completion-item .cVim-left, .cVim-completion-item .cVim-right, #cVim-hud, #cVim-status-bar { | |
| font-family: Helvetica, Helvetica Neue, Neue, sans-serif, monospace, Arial; | |
| font-size: 16pt; | |
| -webkit-font-smoothing: antialiased !important; | |
| } | |
| #cVim-link-container { | |
| position: absolute; | |
| pointer-events: none; | |
| width: 100%; left: 0; |
| set noautofocus | |
| set cncpcompletion | |
| set nosmoothscroll | |
| let scrollduration = 10 | |
| let barposition = "bottom" | |
| let locale="jp" |
| (function(){ | |
| var h2c = document.createElement('script'); | |
| h2c.src = '//github.com/niklasvh/html2canvas/raw/master/build/html2canvas.min.js'; | |
| h2c.onload = function() { | |
| var gli = document.createElement('script'); | |
| gli.src='//github.com/sjhewitt/glitch.js/raw/master/glitch.js'; | |
| gli.onload = function() { | |
| glitch.replace(document.getElementsByTagName('body')[0], { | |
| amount: 120 | |
| }); |
練習も兼ねて「艦これタイマー」という Extension を開発しました。
艦これタイマー for Google Chrome™をつくったぞ〜!!!
できるだけ楽をして綺麗にコードを書いていくために使ったツールなどをまとめておきます。
Heroku 先生様にストレージしてもらっているサーヴィスから鬼のようにエラーが飛んできてたので、静かに
$ h restart --app ***
した。大抵どん詰まったときは restart すればだいたいなんとかなる(それもどうかとおもうけど)のでそれで対処できるとおもったんだけど、それでもエラー吐きまくってて、いよいよこれはおかしいな、と。
Twitter の絡むサーヴィスなので、DevCenter の API Status を確認したんだけど、普通にグリーンだったのでますます変だなあ、と。それで、とりあえずローカルで実行してみたら普通に動いた。