This file contains hidden or 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
// applicationCacheの更新を妨害する | |
Object.defineProperty(this,'applicationCache',{get:function(){return{}}}); | |
(function () { | |
// AppCache上でlocation.hrefを読み込むとAppCacheの内容を読み込むため、「ブラウザは別URLと認識するが、サーバは同じコンテンツを返すURL」を作る | |
contentLoad(location.href+'/'); | |
// 本来であればsubmit等のイベントもキャッチする必要がある | |
window.addEventListener('click', function (evn) { | |
var elem = evn.target; | |
while (elem.tagName.toLocaleLowerCase() != 'a') elem = elem.parentNode; |
This file contains hidden or 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
#!/usr/bin/env ruby | |
cols = (ARGV[0] || 5).to_i - 1 | |
rows = (ARGV[1] || 9).to_i | |
begin | |
table = (0...rows).map do |i| | |
(0...cols).map { rand(2) }.join | |
end | |
end until table.join =~ /1/ |