Skip to content

Instantly share code, notes, and snippets.

View makimoto's full-sized avatar
😪

Shimpei Makimoto makimoto

😪
View GitHub Profile
// ==UserScript==
// @name W and G for Y!100
// @namespace http://d.hatena.ne.jp/makimoto/
// @description Making links to Wikipedia (ja) and Google Search in Yahoo! Hyakka-jiten (Encyclopedia)
// @include http://100.yahoo.co.jp/*
// @require http://jqueryjs.googlecode.com/files/jquery-1.2.6.js
// ==/UserScript==
jQuery(function(){
w = 'http://ja.wikipedia.org/w/index.php?title=%E7%89%B9%E5%88%A5%3A%E6%A4%9C%E7%B4%A2&ns0=1&search='
G = 'http://www.google.co.jp/search?q='
@makimoto
makimoto / rhg-mobi.rb
Last active August 30, 2018 12:16 — forked from miyagawa/rhg-mobi.rb
#!/usr/bin/env ruby
file = File.open("index.html", "r:iso-2022-jp:UTF-8")
content = file.read
all_html = <<HTML
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta name="Author" content="Aoki Minero">
#0 0x00007ffff6d248a5 in raise () from /lib64/libc.so.6
#1 0x00007ffff6d26085 in abort () from /lib64/libc.so.6
#2 0x00007ffff7f3783b in rb_bug (fmt=0x7ffff7f6ff97 "Segmentation fault") at error.c:309
#3 0x00007ffff7e698fb in sigsegv (sig=11, info=0x7ffff8291bf0, ctx=0x7ffff8291ac0) at signal.c:649
#4 <signal handler called>
#5 0x00007ffff7dc348d in gc_mark_children (objspace=0x7ffff8227980, ptr=140737420111120) at gc.c:2835
#6 0x00007ffff7dc3716 in gc_mark_stacked_objects (objspace=0x7ffff8227980) at gc.c:2904
#7 0x00007ffff7dc3890 in gc_marks (objspace=0x7ffff8227980) at gc.c:2949
#8 0x00007ffff7dc3b94 in garbage_collect (objspace=0x7ffff8227980) at gc.c:3038
#9 0x00007ffff7dc3c23 in garbage_collect_with_gvl (objspace=0x7ffff8227980) at gc.c:3060
#0 0x00007f699aec48a5 in raise () from /lib64/libc.so.6
#1 0x00007f699aec6085 in abort () from /lib64/libc.so.6
#2 0x00007f699c0d783b in rb_bug ()
#3 0x00007f699c0098fb in sigsegv ()
#4 <signal handler called>
#5 0x00007f699bf62d01 in markable_object_p ()
#6 0x00007f699bf62d5a in gc_mark ()
#7 0x00007f699bf631bb in gc_mark_children ()
#8 0x00007f699bf63716 in gc_mark_stacked_objects ()
#9 0x00007f699bf63890 in gc_marks ()
RAILS_ENV=production RAILS_GROUPS=assets
/home/vagrant/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/sprockets-2.2.2/lib/sprockets/context.rb:33: [BUG] Segmentation fault
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0052 p:0029 s:0224 e:000223 METHOD /home/vagrant/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/sprockets-2.2.2/lib/sprockets/context.rb:33 [FINISH]
c:0051 p:---- s:0218 e:000217 CFUNC :new
c:0050 p:0071 s:0212 e:000211 METHOD /home/vagrant/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/sprockets-2.2.2/lib/sprockets/bundled_asset.rb:25 [FINISH]
c:0049 p:---- s:0205 e:000204 CFUNC :new
c:0048 p:0073 s:0199 e:000198 METHOD /home/vagrant/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/sprockets-2.2.2/lib/sprockets/base.rb:252
@makimoto
makimoto / gist:5026982
Created February 25, 2013 02:27
rbenv install 2.0.0-p0 build failure
(..snip..)
compiling encoding.c
compiling dmyversion.c
compiling array.c
linking miniruby
ld: warning: directory not found for option '-L/Users/makimoto/.rbenv/versions/2.0.0-p0/lib'
generating encdb.h
/private/var/folders/rf/b4gsb4xs62s88_072yd95fgm0000gp/T/ruby-build.20130225100834.8632/ruby-2.0.0-p0/lib/fileutils.rb:111: [BUG] Stack consistency error (sp: 38, bp: 36)
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin11.4.2]
[1] pry(main)> a = (0...10).lazy.map{|m| puts 'sushi'; m }
=> #<Enumerator::Lazy: ...>
[2] pry(main)> a.force
sushi
sushi
sushi
sushi
sushi
sushi
sushi
:w !command > %
@makimoto
makimoto / install.sh
Created February 27, 2012 15:56
A Homebrew Formula for macvim-kaoriya
brew install https://raw.github.com/gist/1924897/macvim-kaoriya.rb
<source>
type http
port 8888
</source>
<match say.**>
type say
</match>