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
# 8/16/2012 | |
# This is here specifically for font awesome. It causes QT and capybara-webkit | |
# to crash while trying to load the font. | |
# If you are aware of any better way to take care of this problem, let | |
# me know! | |
if Rails.env.test? | |
Rails.application.config.assets.paths.reject! { |path| path.to_s =~ /fonts/ } | |
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
scenario 'closing the map and looking at it later', screenshot: true do | |
# ... | |
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
module MakeFirefoxLaunchInBackground | |
module_function | |
def run | |
webdriver_path = `bundle show selenium-webdriver`.chomp | |
launcher_path = "#{webdriver_path}/lib/selenium/webdriver/firefox/launcher.rb" | |
if !File.exist?(launcher_path) | |
raise "Couldn't find the Firefox launcher file at [#{launcher_path}]." | |
end | |
expected_launch_line = '@binary.start_with @profile, @profile_dir, "-foreground"' |
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
#!/usr/bin/env expect | |
spawn $env(FEDORA_HOME)/server/bin/fedora-rebuild.sh | |
expect "Enter (1-3) --> " { send "1\r" } | |
expect "Enter (1-2) --> " { send "1\r" } | |
interact |
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
#!/usr/bin/env ruby | |
require 'pathname' | |
module TestProductionDataImportToFedora | |
module_function | |
def go(dir) | |
source_dir = find_source dir | |
validate_running_from_rails_root | |
reset_everything |
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
def self.playlist_id | |
SystemConfiguration.youtube.playlist.id | |
end | |
# or | |
config.api_key = SystemConfiguration.airbrake.api_key | |
# or |
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
public byte[] ReadModelNumber() { | |
var loader = new HidDeviceLoader(); | |
var device = loader.GetDevices(0x1234, 0x9876).First(); | |
HidStream stream; | |
device.TryOpen(out stream); | |
var message = new byte[] { 0, 0xaa }; | |
stream.Write(message); | |
return stream.Read(); | |
} |
OlderNewer