前回のコミットから何も変更を加えていない状態。
$ git status
# On branch masternothing to commit, working directory clean
エディタでファイルを編集する
# -*- coding: utf-8 -*- | |
# kakusan tweet / earthquake plugin | |
# | |
Earthquake.init do | |
command %r|^:kakusan\s+(.+)|, :as => :kakusan do |m| | |
words = %w[ 拡散希望 | |
速報 | |
RTお願いします | |
本当に大変な問題です! | |
もう時間がありません。 |
function! s:dash(...) | |
let word = len(a:000) == 0 ? input('Dash search: ') : a:1 | |
call system(printf("open dash://'%s'", word)) | |
endfunction | |
command! -nargs=? Dash call <SID>dash(<f-args>) |
# -*- coding: utf-8 -*- | |
# honki dase plugin | |
# | |
# e.g.: | |
# event registration from tweet | |
# $ 20:00に本気だす | |
# | |
require 'time' | |
Earthquake.init do |
require 'open-uri' | |
require 'cgi' | |
def show_image_on_iterm(url) | |
filename = '/tmp/image_on_iterm' | |
system('curl %s > %s 2>/dev/null' % [url, filename]) | |
command =<<CMD % filename | |
osascript -e " | |
tell application \\"iTerm\\" | |
tell the first terminal |
%w(nokogiri open-uri).each {|g| require g } | |
def extract_title(url) | |
open(url) do |f| | |
if f.content_type =~ /html/ | |
doc = Nokogiri::HTML(f) | |
title = doc.xpath('//title')[0] | |
title ? title.text : nil | |
end | |
end |
札幌 青森 5時間7分 | |
札幌 盛岡 6時間35分 | |
札幌 仙台 3時間45分 | |
札幌 秋田 2時間54分 | |
札幌 山形 5時間17分 | |
札幌 福島 4時間43分 | |
札幌 水戸 5時間20分 | |
札幌 宇都宮 4時間50分 | |
札幌 前橋 5時間19分 | |
札幌 さいたま 4時間21分 |
%w(v8 open-uri).each {|g| require g } | |
class ZWS | |
def initialize | |
@cxt = V8::Context.new | |
open("https://raw.github.com/youpy/node-zws/master/lib/zws.js") do |file| | |
@cxt.eval(file, "zws.js") | |
end | |
end |
var proto = function (n, s) { this[n] = s }; | |
proto.prototype = { | |
i : 1, valueOf :function () { | |
var ret = this[this.i++]; | |
if (ret) this.i = 1; | |
return ret || ''; | |
} | |
} | |
var fizz = new proto(3, 'fizz'); |