Skip to content

Instantly share code, notes, and snippets.

View morygonzalez's full-sized avatar
🌴
I may be slow to respond.

Hitoshi Nakashima morygonzalez

🌴
I may be slow to respond.
View GitHub Profile
@kurotaky
kurotaky / git-study-sample.md
Last active June 6, 2024 16:46
git commit するまでに自分がやっていること

コミットするまでの流れ

前回のコミットから何も変更を加えていない状態。

$ git status
# On branch masternothing to commit, working directory clean

エディタでファイルを編集する

@siyo
siyo / kakusan.rb
Last active December 16, 2015 07:59
# -*- coding: utf-8 -*-
# kakusan tweet / earthquake plugin
#
Earthquake.init do
command %r|^:kakusan\s+(.+)|, :as => :kakusan do |m|
words = %w[ 拡散希望
速報
RTお願いします
本当に大変な問題です!
もう時間がありません。
@mattn
mattn / dash.vim
Last active December 13, 2015 21:09
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>)
@siyo
siyo / honki_dase.rb
Last active December 12, 2015 02:09
# -*- 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
@youpy
youpy / eq_extract_title.rb
Last active October 11, 2015 02:58
earthquake plugin to extract title from URL
%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
@Gab-km
Gab-km / github-flow.ja.md
Last active April 23, 2025 04:19 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@fuba
fuba / gist:3596119
Created September 2, 2012 09:08
県庁所在地間の所要時間 2012年9月2日7時0分発版(乗換案内からクロール)
札幌 青森 5時間7分
札幌 盛岡 6時間35分
札幌 仙台 3時間45分
札幌 秋田 2時間54分
札幌 山形 5時間17分
札幌 福島 4時間43分
札幌 水戸 5時間20分
札幌 宇都宮 4時間50分
札幌 前橋 5時間19分
札幌 さいたま 4時間21分
@youpy
youpy / eq_zws.rb
Created August 22, 2012 00:44
ZWS plugin for earthquake
%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');