Skip to content

Instantly share code, notes, and snippets.

View uiur's full-sized avatar

Kazato Sugimoto uiur

View GitHub Profile
@ericboehs
ericboehs / gist:7125105
Created October 23, 2013 19:30
Poltergeist hack to silence CoreText performance notes from phantomjs
module Capybara::Poltergeist
class Client
private
def redirect_stdout(to)
prev = STDOUT.dup
prev.autoclose = false
$stdout = to
STDOUT.reopen(to)
prev = STDERR.dup
var list = require('./list.json');
var fs = require('fs');
var page = require('webpage').create();
var result = require('./result.json') || {};
var finalize = function(){
fs.write('result.json', JSON.stringify(result),'w');
phantom.exit()
}
var failSeach = function(text) {
return !(text.indexOf('画像が大きすぎるか、') === -1 &&