Skip to content

Instantly share code, notes, and snippets.

View tdtds's full-sized avatar
🐱
🐱

Tada, Tadashi tdtds

🐱
🐱
View GitHub Profile
// 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;
@tdtds
tdtds / amida.rb
Created June 2, 2012 05:48 — forked from ymorimo/amida.rb
#minatork01
#!/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/