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
I created a world object | |
module WebDriver | |
@@browser = nil | |
def self.extended(base) | |
@@browser = Selenium::WebDriver.for :firefox if @@browser.nil? | |
end | |
at_exit do |
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
/Library/Ruby/Gems/1.8/gems/selenium-webdriver-0.0.8/firefox/src/rb/lib/selenium/webdriver/firefox/extension_connection.rb:43:in `write': closed stream (IOError) | |
from /Library/Ruby/Gems/1.8/gems/selenium-webdriver-0.0.8/firefox/src/rb/lib/selenium/webdriver/firefox/extension_connection.rb:43:in `send_string' | |
from /Library/Ruby/Gems/1.8/gems/selenium-webdriver-0.0.8/firefox/src/rb/lib/selenium/webdriver/firefox/extension_connection.rb:49:in `quit' | |
from /Library/Ruby/Gems/1.8/gems/selenium-webdriver-0.0.8/firefox/src/rb/lib/selenium/webdriver/firefox/bridge.rb:29:in `quit' | |
from /Library/Ruby/Gems/1.8/gems/selenium-webdriver-0.0.8/common/src/rb/lib/selenium/webdriver/driver.rb:74:in `quit' | |
from ./features/support/paths.rb:12 |
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
# I wanted to | |
# define a class which has a foo method | |
# which can also be called from a block | |
# so you can spice it and call the super | |
# class method again | |
# | |
# thanks to banisterfiend, xxxxxx and coderr | |
# for helping me on this one | |
class Document |
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
Ensuring we have the latest version of cinderella installed | |
Password: | |
Cinderella installed successfully | |
sh: line 24: cinderella: command not found | |
sh: line 24: cinderella: command not found | |
sh: line 24: cinderella: command not found | |
Run started Mon Nov 8 21:07:05 CET 2010 | |
/usr/local/homebrew/bin/ruby | |
/usr/local/homebrew/bin/gem | |
ERROR: While executing gem ... (Gem::InstallError) |
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 AttachmentUploader < CarrierWave::Uploader::Base | |
include CarrierWave::MiniMagick | |
storage :s3 | |
def s3_headers | |
content_type = {"Content-Type" => "application/octet-stream"} | |
if self.file.filename.match(/(\.jpg)|(\.jpeg)/) | |
content_type = {"Content-Type" => "image/jpeg"} | |
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
- (NSString *)wl_stringBySanitizingString { | |
NSString *sanitizedString = [self stringByReplacingOccurrencesOfString:@"(" withString:@""]; | |
sanitizedString = [sanitizedString stringByReplacingOccurrencesOfString:@")" withString:@""]; | |
sanitizedString = [sanitizedString stringByReplacingOccurrencesOfString:@"/" withString:@""]; | |
sanitizedString = [sanitizedString stringByReplacingOccurrencesOfString:@"\\" withString:@""]; | |
sanitizedString = [sanitizedString stringByReplacingOccurrencesOfString:@"&" withString:@"and"]; | |
sanitizedString = [sanitizedString stringByReplacingOccurrencesOfString:@"?" withString:@""]; | |
sanitizedString = [sanitizedString stringByReplacingOccurrencesOfString:@"'" withString:@""]; | |
sanitizedString = [sanitizedString stringByReplacingOccurrencesOfString:@"\"" withString:@""]; |
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
Using rake (0.8.7) | |
Using Platform (0.4.0) | |
Using open4 (1.0.1) | |
Using POpen4 (0.1.4) | |
Using abstract (1.0.0) | |
Using activesupport (3.0.7) | |
Using builder (2.1.2) | |
Using i18n (0.5.0) | |
Using activemodel (3.0.7) | |
Using erubis (2.6.6) |
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
set :stages, %w(production staging) | |
set :default_stage, 'staging' | |
require 'capistrano/ext/multistage' | |
set :application, "imgly-tracking" | |
set :domain, "node.9elements.com" | |
set :user, "imgly-tracking" | |
set :repository, "[email protected]:9elements/imgly-tracking.git" | |
set :use_sudo, false |
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
function fish_prompt -d 'Write out the prompt' | |
# is there a more elegant method to extract the ruby version? | |
printf '%s%s%s ' (set_color red --bold) (rbenv version | tr " " "\n" | sed -n 1p) (set_color normal) | |
printf '%s%s%s %s$ ' (set_color $fish_color_cwd --bold) (prompt_pwd) (set_color normal --bold) (fish_prompt_scm) | |
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
config defaultToCurrentScreen true | |
config nudgePercentOf screenSize | |
config resizePercentOf screenSize | |
bind right:alt;cmd push right bar-resize:screenSizeX/2 | |
bind left:alt;cmd push left bar-resize:screenSizeX/2 | |
bind up:alt;cmd push up bar-resize:screenSizeY/2 | |
bind down:alt;cmd push down bar-resize:screenSizeY/2 | |
bind .:alt;cmd move 50;0 screenSizeX;screenSizeY |
OlderNewer