Take control over when the screenshot is taken.
Checkout the Javascript over at http://codepen.io/anon/pen/pJRvvV
Take control over when the screenshot is taken.
Checkout the Javascript over at http://codepen.io/anon/pen/pJRvvV
| require 'rubygems' | |
| require 'bundler/setup' | |
| require 'json' | |
| require 'octokit' | |
| # ENV['GITHUB_ORGANIZATION'] ||= "" | |
| # ENV['GITHUB_USERNAME'] ||= "" | |
| # ENV['GITHUB_PASSWORD'] ||= "" # https://github.com/settings/tokens/new | |
| Octokit.configure do |c| |
| Last login: Fri May 3 18:28:34 2013 | |
| root@wtf:~# history | |
| 1 cd /var/log | |
| 2 ll | |
| 3 rm /var/log/dmesg | |
| 4 rm /var/log/dmesg.0 | |
| 5 last | |
| 6 ll | |
| 7 rm /var/log/auth.log | |
| 8 rm /var/log/boot.log |
| # A sample Gemfile | |
| source "http://rubygems.org" | |
| gem "redis" | |
| gem 'eventmachine', :git => 'git://github.com/eventmachine/eventmachine.git' | |
| gem "em-hiredis" | |
| # gem "em-synchrony" | |
| gem "em-websocket" |
| source :rubygems | |
| gem 'sinatra' | |
| gem 'json' | |
| gem 'omniauth' | |
| gem 'omniauth-oauth2' | |
| gem 'omniauth-github' | |
| # gem 'omniauth-att', :path => File.expand_path("./../../omniauth-att", __FILE__) | |
| gem 'thin' |
| # 1. grab http://sveinbjorn.org/platypus | |
| # 2. brew install s3cmd | |
| # 3. setup your ~/.s3cfg | |
| # 4. drop this shell script in a file and then run platypus | |
| UUID=`uuidgen` | |
| FILENAME="$UUID.png" | |
| /usr/local/bin/s3cmd put "$1" s3://klowd/$FILENAME | |
| REMOTE="http://s3.amazonaws.com/klowd/$FILENAME" | |
| echo $REMOTE | pbcopy |
| # normal Gem dependancy declarations | |
| # ... | |
| group :test, :cucumber do | |
| gem 'pdf-reader' | |
| end |
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
| #!/usr/bin/env ruby | |
| require 'em-proxy' | |
| Proxy.start(:host => "0.0.0.0", :port => 9201, :debug => false) do |conn| | |
| conn.server :srv, :host => "127.0.0.1", :port => 9200 | |
| conn.on_data do |data| | |
| puts data | |
| data |