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
$ git clone https://github.com/keithclark/selectivizr.git | |
Cloning into selectivizr... | |
remote: Counting objects: 131, done. | |
remote: Compressing objects: 100% (112/112), done. | |
remote: Total 131 (delta 48), reused 0 (delta 0) | |
Receiving objects: 100% (131/131), 28.41 KiB, done. | |
Resolving deltas: 100% (48/48), done. | |
$ cd selectivizr/ | |
$ git config --global core.autocrlf true | |
$ git rm --cached -r . |
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
#!/bin/sh | |
# Auto-applies changes from the index to a previous commit | |
# eg | |
# git add foo | |
# git autofix HEAD~3 | |
#!/bin/sh | |
target="$(git rev-parse $1)" |
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
require 'capybara' | |
require 'rack' | |
class IframeServer | |
def call(env) | |
r = Rack::Request.new(env) | |
content = case r.path | |
when '/container.html' | |
pages[0] | |
when '/iframe1.html' |
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
require 'selenium-webdriver' | |
require 'rack' | |
require 'rack/handler/thin' | |
class IframeServer | |
def start | |
@pid = fork { Rack::Handler::Thin.run(self, :Port => 9292) } | |
poller = Selenium::WebDriver::SocketPoller.new("localhost", 9292, 30) | |
raise "could not start #{self.inspect}" unless poller.connected? |
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
<object data="http://boos.audioboo.fm/swf/playlist_player.swf" height="350" type="application/x-shockwave-flash" width="300"> | |
<param name="movie" value="http://boos.audioboo.fm/swf/playlist_player.swf"> | |
<param name="scale" value="noscale"><param name="salign" value="TL"> | |
<param name="align" value="left"><param name="allowScriptAccess" value="always"> | |
<param name="wmode" value="transparent"><param name="quality" value="best"> | |
<param name="FlashVars" value="rssURL=http://audioboo.fm/tag/londonriots.atom"> | |
<param name="loop" value="false"><param name="allowFullScreen" value="false"> | |
<a href="http://audioboo.fm/tag/londonriots">Listen on audioboo.fm!</a> | |
</object> |
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
class RailsLogInterpolator | |
def before_step(step) | |
@current_step = step | |
Rails.logger.info("{{{ #{step.name}") | |
end | |
def before_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background) | |
Rails.logger.info(" #{@current_step.name} }}}\n") | |
end | |
end |
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
server = Thread.new do | |
rack = Rack::Server.new(:Port=>8000) | |
# rack 1.2 ignores the :app option, force it manually: | |
rack.instance_variable_set('@app', Rack::Directory.new(Rails.root.join('test/javascript'))) | |
rack.start | |
end | |
sleep(0.5) | |
Launchy.open("http://localhost:8000/index.html") | |
server.join |
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
$ ./redis-load | |
PRNG seed is: 1790627319 - use the 'seed' option to reproduce the same sequence | |
====== Report ====== | |
10000 requests in 14.459 seconds | |
691.61 requests per second | |
50 parallel clients | |
payload: 1..64 bytes | |
keep alive: 1 | |
29.16% < 1 ms |
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
server { | |
server_name www.foo.com; | |
return 301 foo.com$request_uri; | |
} | |
server { | |
listen [::]:80; | |
server_name foo.com; | |
return 200; | |
} |
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
[0.000][INFO]: ChromeDriver 18.0.1022.0 /Users/_jenkins/chromedriver/chromedriver | |
[0.209][FINE]: Initializing session with capabilities { | |
"browserName": "chrome", | |
"chrome.detach": true, | |
"chromeOptions": { | |
"detach": true | |
}, | |
"cssSelectorsEnabled": true, | |
"javascriptEnabled": true, | |
"nativeEvents": false, |