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
(function () { | |
const api = { | |
matchingUrls: new RegExp('^https?://feedly.com/'), | |
get doc () content.document, |
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
(function () { | |
let A = Array.slice; | |
const selectors = { | |
selectedEntry: '.fd_focus', | |
currentFeedTitle: '.fd_current_feed_title', | |
feeds: '.fd_feed', | |
feedTitle: '.fd_feed_title', |
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
command! data :echo let(bs=JSON.parse(util.httpGet('http://b.hatena.ne.jp/entry/json/?url=' + encodeURIComponent(buffer.URL)).responseText).bookmarks)(bs.map(function(it)it.timestamp).sort())[0] |
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
#!/bin/sh | |
case "$1" in | |
on) | |
value=1 | |
;; | |
off) | |
value=0 | |
;; | |
*) |
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
set runtimepath+=~/.vim-temp/bundle/incsearch.vim | |
nmap / <Plug>(incsearch-forward) |
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
class SteelHash | |
def initialize (hash) | |
hash.each do | |
|k, v| | |
define_singleton_method(k) { v } | |
end | |
end | |
end | |
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
#!/bin/bash | |
for file in "$@" | |
do | |
mpg123 -loop=-1 -- "$file" & | |
done |
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
# スコープを作るメソッド | |
scope := method( | |
expr := call message arguments first | |
context := Object clone | |
msg := message(do) | |
msg setNext(expr) | |
context prependProto(call sender) | |
context forward := method( | |
self proto doMessage(call message clone do( setNext(nil) )) | |
) |
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
Foo := Object clone | |
Foo bar := method( | |
# 呼び出し元の値を参照 | |
call sender v println | |
# 呼び出し元の値を書き換え! | |
call sender v = "new value" | |
) | |
Object clone do( | |
v := "local value" |
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
import System.IO | |
import Network.URI | |
import Network.HTTP | |
import Network.Stream | |
import Control.Concurrent | |
padnum n | n < 10 = '0' : show n | |
| otherwise = show n | |
filename h m = padnum h ++ padnum m ++ ".jpg" |