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
# NOTE: To test asset pipeline in development set the following config.assets.* below in | |
# your config/environments/development.rb and then run: | |
# | |
# $ RAILS_ENV=development rake assets:precompile | |
# | |
# It is recommended you rm -rf public/assets and turn off these settings in development when | |
# you are finished or this may cause issues with assets in your local development environment | |
# | |
# config.assets.compress = true | |
# config.assets.compile = 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
# Helper class to save urls to a file | |
class UrlLoader | |
# Download a url and optionally specify a path to save it to a file. | |
def self.get(url, path=nil) | |
# set curl to timeout after 30 minutes for any calls | |
cmd = "curl --fail --location --silent --show-error --max-redirs 10 --connect-timeout 60 --max-time 1800" | |
cmd += " --output #{path}" unless path.nil? | |
cmd += " '#{url}'" | |
rsp = `#{cmd}` | |
raise "Received non-success response code for url: '#{url}'" if (path.nil? ? rsp.empty? : (!File.exists?(path) || File.size(path) == 0)) |
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
h=fs.open("/gfs","w");h.write(http.get("https://gist.github.com/ntalbott/4719172/raw/gfs.lua").readAll());h.close();print "Done"; |
NewerOlder