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
MAIN_CODE = %w~ | |
_quine_template_ = ->(_data_, _zipped_, _padding_, _width_, _height_) { | |
%` | |
#{(_zipped_) ? "require 'zlib';" : ''} | |
_aa_data_ = Marshal.load(#{(_zipped_) ? 'Zlib::Inflate.inflate(' : ''} | |
'#{_data_}'.unpack('m')[0]#{(_zipped_) ? ')' : ''}); | |
_self_ = 'eval$s=%w' << 96 << ($s * #{_padding_}); | |
_result_ = ''; | |
_index_ = -1; | |
#{_width_ * _height_}.times { |_counter_| |
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
eval$s=%w~ | |
a=->(b,c, d,e,f){%`#{(c)?"re quire'zlib';":' | |
'}g=Marshal.load(#{ (c)?'Z lib::Inflate.infl | |
ate(':''}'#{b}'. unpack('m')[0]#{(c)?')': | |
''});h= 'eval$s =%w'<<126<<($s*#{d} );i=' | |
';j=- 1; #{ e*f}.times{|k|i<< (g[ | |
k]== 1? h[j+=1]:32);i<<10i f | |
(k% #{e} ==#{e-1})};i[-7,6] | |
=' ' < <126<< '.join';puts(i)#`}; | |
$*[ 0]? ( require' RMagick';include(Ma |
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
# Stubbing a Kernel method in a constructor | |
class Sample | |
def initialize | |
puts 'Hello world!' | |
end | |
end | |
describe Sample do | |
it '#initialize call puts' do |
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
// ==UserScript== | |
// @name NicoVideo-Pixiv CrossPedia | |
// @namespace http://d.hatena.ne.jp/shibason/ | |
// @description ニコニコ大百科⇔ピクペディアの相互参照 | |
// @include http://www.nicovideo.jp/watch/* | |
// @include http://dic.nicovideo.jp/a/* | |
// @include http://www.pixiv.net/member_illust.php* | |
// @include http://dic.pixiv.net/a/* | |
// @author shibason | |
// @version 1.0 |