This file contains hidden or 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 'selenium/webdriver' | |
require 'capybara/dsl' | |
include Capybara::DSL | |
Capybara.run_server = false | |
# setting driver | |
# rack_test is default and non js | |
# selenium_chome_headless seems best headless option |
This file contains hidden or 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
h = {} | |
Dir.glob('config/locales/**/*.yml').each do |f| | |
h[f] = YAML.load(File.read(f)) | |
end | |
@lines = [] | |
def print_h(h) | |
h.each do |k,v| | |
if v.is_a? String | |
@lines << v |
This file contains hidden or 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
#put file list on dropbox public folder | |
#run cron every 5 mins | |
page = `curl 'http://dl.dropbox.com/u/xxxxxxx/sites_to_reload.txt' 2>/dev/null` | |
sites = page.split("\n").each do |site| | |
`curl '#{site.strip}' > /dev/null 2>&1` | |
end |
This file contains hidden or 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 'rubygems' | |
require 'aws/s3' | |
include AWS::S3 | |
Base.establish_connection!( | |
:access_key_id => '#####################', | |
:secret_access_key => '###############################' | |
) | |
today = Time.now.strftime("%Y%m%d") |